Class: Declarative::Options
- Inherits:
-
Hash
- Object
- Hash
- Declarative::Options
- Defined in:
- lib/declarative/options.rb
Instance Method Summary collapse
-
#call(context, *args) ⇒ Object
Evaluates every element and returns a hash.
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 |