Module: RubyUnderscore::Base::ClassMethods

Defined in:
lib/ruby_underscore.rb

Instance Method Summary collapse

Instance Method Details

#method_added(method_name) ⇒ Object



6
7
8
9
# File 'lib/ruby_underscore.rb', line 6

def method_added(method_name)
  super
  UnderscoreEnhancer.new.enhance self, method_name
end

#singleton_method_added(method_name) ⇒ Object



11
12
13
14
15
# File 'lib/ruby_underscore.rb', line 11

def singleton_method_added(method_name)
  super
  metaclass = class << self; self; end
  UnderscoreEnhancer.new.enhance metaclass, method_name
end