Skip to content

Instantly share code, notes, and snippets.

@lak
Created March 19, 2009 17:51
Show Gist options
  • Save lak/81966 to your computer and use it in GitHub Desktop.
Save lak/81966 to your computer and use it in GitHub Desktop.
class One
attr_reader :two
def two=(two)
@two = two
two.one = self
end
end
class Two
attr_accessor :one
end
myone = One.new
mytwo = Two.new
myone.two = mytwo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment