D
dkmd_nielsen
class A
end
class C
def initialize
x = [A.new,A.new]
end
def template
x
end
end
Is it possible for an instance of A to determine the instance of C
that instantiated it?
The application I'm working on has a class named Template that
contains an array of Blocks. What I would like to do is have an
instance of Block reference back to Template's array so that it can
search for a particular sibling block in the array. Is the structure
built incorrectly? (It's too late to rebuild at this time.)
Thanks,
dvn
end
class C
def initialize
x = [A.new,A.new]
end
def template
x
end
end
Is it possible for an instance of A to determine the instance of C
that instantiated it?
The application I'm working on has a class named Template that
contains an array of Blocks. What I would like to do is have an
instance of Block reference back to Template's array so that it can
search for a particular sibling block in the array. Is the structure
built incorrectly? (It's too late to rebuild at this time.)
Thanks,
dvn