Class: Quincunx::Environment

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/quincunx/environment.rb

Instance Method Summary collapse

Constructor Details

#initialize(obj, params) ⇒ Environment

Returns a new instance of Environment.



4
5
6
7
# File 'lib/quincunx/environment.rb', line 4

def initialize(obj, params)
  super(obj)
  @params = params
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



9
10
11
# File 'lib/quincunx/environment.rb', line 9

def method_missing(name, *args, &block)
  params.fetch(name.to_sym) { super }
end