Skip to content

Instantly share code, notes, and snippets.

@porras
Created August 8, 2013 09:20
Show Gist options
  • Save porras/6183099 to your computer and use it in GitHub Desktop.
Save porras/6183099 to your computer and use it in GitHub Desktop.
irb(main):001:0> class A; private; attr_reader :a; end
=> nil
irb(main):002:0> A.new.a
NoMethodError: private method `a' called for #<A:0x007fbbca0403c0>
from (irb):2
from /Users/sergiogil/.rbenv/versions/1.9.3-p448/bin/irb:12:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment