Class: Uber::Options
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.
Methods inherited from Hash
#argumentize, #capitalize_keys, #compact, #except, #normalize_keys, #object_state, #only, #recursive_fetch, #recursive_merge, #recursively_capitalize_key, #recursively_normalize_keys, #recursively_stringify_key, #recursively_symbolize_keys, #recursively_transform_keys, #stringify_keys, #symbolize_keys, #to_struct, #transform_keys, #zip
Constructor Details
Instance Method Details
#eval(key, *args) ⇒ Object
Evaluates a single value.
26 27 28 |
# File 'lib/garcon/utility/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/garcon/utility/uber/options.rb', line 19 def evaluate(context, *args) return @static unless dynamic? evaluate_for(context, *args) end |