Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Logger
- module ClassMethods
- def classmethod1
- :foo
- end
- def classmethod2
- :bar
- end
- end
- def instancemethod1
- :baz
- end
- def instancemethod2
- :qux
- end
- def self.included(base)
- base.extend(ClassMethods)
- end
- end
- #how can i also use the module LoggerClassMethods to create instance methods instead of class methods with the self.included(base) hook?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement