Guest User

Untitled

a guest
Feb 20th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. # module singleton methods included in a class do not respond to Class.method call
  2. # NoMethodError is raised
  3. module Bla
  4. def self.bla
  5. puts 'hello bla'
  6. end
  7. end
  8.  
  9. class Foo
  10. include Bla
  11. def self.blaf
  12. puts 'hello blaf'
  13. end
  14. end
  15.  
  16. Foo.blaf # => 'hello blaf'
  17. Foo.bla # => undefined method `bla' for Foo:Class (NoMethodError)
Add Comment
Please, Sign In to add comment