Class: MindReader::ConfigurableObject

Inherits:
Object
  • Object
show all
Defined in:
lib/mind_reader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfigurableObject

Returns a new instance of ConfigurableObject.



98
99
100
# File 'lib/mind_reader.rb', line 98

def initialize
  @configs = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args, &block) ⇒ Object



102
103
104
# File 'lib/mind_reader.rb', line 102

def method_missing(method_name, *args, &block)
  @configs << {:field => method_name, :args => args.first, :block => block}
end

Instance Attribute Details

#configsObject (readonly)

Returns the value of attribute configs.



106
107
108
# File 'lib/mind_reader.rb', line 106

def configs
  @configs
end