Module: NewClass::ClassMethods::MethodMissing
- Defined in:
- lib/new_class.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
40
41
42
|
# File 'lib/new_class.rb', line 40
def method_missing(method, *args)
_variables.include?(key = method.to_sym) ? _variables[key] : super
end
|
Instance Method Details
#respond_to?(symbol, include_private = false) ⇒ Boolean
43
44
45
|
# File 'lib/new_class.rb', line 43
def respond_to?(symbol, include_private = false)
_variables.include?(symbol.to_sym) || super
end
|