Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 0.22 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. class Person
  2.  attr_accessor :name
  3. end
  4.  
  5. class ReceivePerson
  6.   attr_accessor :person
  7.  
  8.   def initialize(person)
  9.     self.person = person
  10.   end
  11. end
  12.  
  13. p = Person.new
  14. p.name = "lucas"
  15.  
  16. r = ReceivePerson.new(p)
  17. puts r.person.name