Property Access in Ruby


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. class Foo
  2. def initialize
  3. @bar
  4. end
  5.  
  6. def bar=(bar)
  7. @bar = bar
  8. end
  9. end

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.