Skip to content

Instantly share code, notes, and snippets.

@paulfryzel
Created November 2, 2012 22:09
Show Gist options
  • Save paulfryzel/4004659 to your computer and use it in GitHub Desktop.
Save paulfryzel/4004659 to your computer and use it in GitHub Desktop.
[1] pry(main)> class Foo; end
=> nil
[2] pry(main)> Foo.foo
NoMethodError: undefined method `foo' for Foo:Class
from (pry):3:in `<main>'
[3] pry(main)> class Foo; def self.foo; puts "foo"; end; end
=> nil
[4] pry(main)> Foo.foo
foo
=> nil
[5] pry(main)> Foo.bar
NoMethodError: undefined method `bar' for Foo:Class
from (pry):6:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment