KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I read the API for ActiveSupport::Concern. There are ClassMethods and InstanceMethods , we can put class methods in ClassMethods . But the M 's host can use the methods defined in M , can't it? Why can't I just write: module M def self.x end def y end end rather than: module M module ClassMethods def x end end module InstanceMethods def y end end end
Tags (comma-separated)
Save Edits
Cancel