P
pachl
Is it recommended to include the parent class when reopening a child
class? What are the consequences of each?
class Parent
def meth0; 'meth0' end
end
class Child < Parent
def meth1; 'meth1' end
end
# Reopen class w/o parent
class Child
def meth2; 'meth2' end
end
# Reopen class w/ parent
class Child < Parent
def meth3; 'meth3' end
end
class? What are the consequences of each?
class Parent
def meth0; 'meth0' end
end
class Child < Parent
def meth1; 'meth1' end
end
# Reopen class w/o parent
class Child
def meth2; 'meth2' end
end
# Reopen class w/ parent
class Child < Parent
def meth3; 'meth3' end
end