Class: Configuration::Pure

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

Constant Summary collapse

Instance_Methods =
Hash.new
Protected =
%r/^__|^object_id$/

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Pure

Returns a new instance of Pure.



221
222
223
# File 'lib/configuration.rb', line 221

def initialize object
  @object = object
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *a, &b) ⇒ Object



217
218
219
# File 'lib/configuration.rb', line 217

def method_missing m, *a, &b
  Instance_Methods[m.to_s].bind(@object).call(*a, &b)
end

Class Method Details

.[](object) ⇒ Object



225
226
227
# File 'lib/configuration.rb', line 225

def Pure.[] object
  new object
end