I have some code similar to below, which expresses my intent, but is not what
is happening. Who is calling B#initialize? Do I need a call to super in
B#initialise? I keep getting trash in the b and c passed to B#initialize or
error messages saying that there are too many args being passed to
B#initialize. I obviously have a very murky understanding of how to achieve
what I want. Thanks ahead for any advice.
class A
def A.new(a, *args)
end
end
class B < A
def B.new(a, b, c)
x = 1
y = 2
z = 3
<more>
super(a, x, y, z, <more>)
end
def initialize(a, b, c)
@a = a
@b = b
@c = c
end
end
B.new(a,b,c) #<==preferred method of creating a B instance
--
Quantum Mechanics: The dreams stuff is made of