Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo ; attr_accessor_with_history :bar ; end
- => nil
- f = Foo.new
- => #<Foo:0x127e678>
- f.bar = 3
- => 3
- f.bar = :wowzo
- => :wowzo
- f.bar = 'boo!'
- => 'boo!'
- f.history(:bar)
- >> [3, :wowzo, 'boo!']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement