Class: Eggshell::ExpressionEvaluator::ExprHash
- Inherits:
-
Hash
- Object
- Hash
- Eggshell::ExpressionEvaluator::ExprHash
- Defined in:
- lib/eggshell/expression-evaluator.rb
Instance Attribute Summary collapse
-
#dyn_keys ⇒ Object
readonly
Returns the value of attribute dyn_keys.
-
#dynamic ⇒ Object
Returns the value of attribute dynamic.
Instance Method Summary collapse
Instance Attribute Details
#dyn_keys ⇒ Object (readonly)
Returns the value of attribute dyn_keys.
62 63 64 |
# File 'lib/eggshell/expression-evaluator.rb', line 62 def dyn_keys @dyn_keys end |
#dynamic ⇒ Object
Returns the value of attribute dynamic.
61 62 63 |
# File 'lib/eggshell/expression-evaluator.rb', line 61 def dynamic @dynamic end |
Instance Method Details
#add_term(key, term) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/eggshell/expression-evaluator.rb', line 64 def add_term(key, term) @dyn_keys = [] if !@dyn_keys if term.is_a?(ExprArray) || term.is_a?(ExprHash) if term.dynamic @dynamic = true @dyn_keys << key end elsif term.is_a?(Array) term, dyn = Eggshell::ExpressionEvaluator::struct_compact(term) if dyn @dynamic = true @dyn_keys << key end end self[key] = term end |