Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Sandwich
- attr_accessor :fillings
- def initialize(fillings = nil, *a); @fillings = fillings; end
- end
- class Person
- attr_accessor :sandwich
- def initialize(*a); @sandwich = nil; end
- end
- aco = Person.new
- aco.sandwich = Sandwich.new([:ham, :cheese])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement