Module: LightParams::PropertiesConfiguration
- Included in:
- Lash
- Defined in:
- lib/light_params/properties_configuration.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary
collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
85
86
87
88
89
|
# File 'lib/light_params/properties_configuration.rb', line 85
def method_missing(method, *args, &block)
method_writer = method.to_s[-1] == '='
return (method_writer ? self.[]=(method.to_s[-1].to_sym, *args, &block) : self.[](method, *args, &block)) if respond_to?(method)
super
end
|
Class Method Details
.included(base) ⇒ Object
6
7
8
|
# File 'lib/light_params/properties_configuration.rb', line 6
def self.included(base)
base.extend(ClassMethods)
end
|
Instance Method Details
#respond_to?(method_name, include_private = false) ⇒ Boolean
74
75
76
77
|
# File 'lib/light_params/properties_configuration.rb', line 74
def respond_to?(method_name, include_private = false)
return _properties.include?(method_name.to_s.delete('=').to_sym) unless super
false
end
|