Module: TokyoMetro::Modules::Common::ConvertConstantToClassMethod::ClassMethods

Defined in:
lib/tokyo_metro/modules/common/convert_constant_to_class_method.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/tokyo_metro/modules/common/convert_constant_to_class_method.rb', line 11

def method_missing( method_name , *args )
  if costants_converted_by_method_missing.include?( method_name.upcase )
    return const_get( method_name.upcase )
  else
    super( method_name , *args )
  end
end