Displaying 1 result from an estimated 1 matches for "setup_c".
Did you mean:
setup_
2012 Sep 14
1
calling method on base intended to simulate initialize on instances?
class A
def initialize
setup_b
setup_c
end
def b_and_c
"#{@b} and #{@c}"
end
private
def setup_b
@b = ''b''
end
def setup_c
@c = ''c''
end
def setup_d
@d = ''d''
end
end
a = A.new
a.instance_variable_get("@b") # => "b"
a...