Class: Declarative::Options

Inherits:
Hash
  • Object
show all
Defined in:
lib/declarative/options.rb

Instance Method Summary collapse

Instance Method Details

#call(context, *args) ⇒ Object

Evaluates every element and returns a hash. Accepts context and arbitrary arguments.



12
13
14
# File 'lib/declarative/options.rb', line 12

def call(context, *args)
  Hash[ collect { |k,v| [k,v.(context, *args) ] } ]
end