Module: Maxwell::Agent::DynamicAttributes
- Included in:
- Host
- Defined in:
- lib/maxwell/agent/dynamic_attributes.rb
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args) ⇒ Object
4 5 6 7 8 |
# File 'lib/maxwell/agent/dynamic_attributes.rb', line 4 def method_missing(method_name, *args) singleton_class. class_eval { attr_accessor method_name.to_s.gsub(/=$/, '') } send(method_name, *args) end |