Class: Uber::Options
- Inherits:
-
Hash
- Object
- Hash
- Uber::Options
- Defined in:
- lib/uber/options.rb
Defined Under Namespace
Classes: Value
Instance Method Summary collapse
-
#eval(key, *args) ⇒ Object
Evaluates a single value.
-
#evaluate(context, *args) ⇒ Object
Evaluates every element and returns a hash.
-
#initialize(options) ⇒ Options
constructor
A new instance of Options.
Constructor Details
Instance Method Details
#eval(key, *args) ⇒ Object
Evaluates a single value.
26 27 28 |
# File 'lib/uber/options.rb', line 26 def eval(key, *args) self[key].evaluate(*args) end |
#evaluate(context, *args) ⇒ Object
Evaluates every element and returns a hash. Accepts context and arbitrary arguments.
19 20 21 22 23 |
# File 'lib/uber/options.rb', line 19 def evaluate(context, *args) return @static unless dynamic? evaluate_for(context, *args) end |