Class: Fabulator::Core::Actions::Value
- Inherits:
-
Action
- Object
- Action
- Fabulator::Core::Actions::Value
- Defined in:
- lib/fabulator/core/actions/variables.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#select ⇒ Object
Returns the value of attribute select.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/fabulator/core/actions/variables.rb', line 14 def name @name end |
#select ⇒ Object
Returns the value of attribute select.
14 15 16 |
# File 'lib/fabulator/core/actions/variables.rb', line 14 def select @select end |
Instance Method Details
#run(context, autovivify = false) ⇒ Object
21 22 23 24 25 |
# File 'lib/fabulator/core/actions/variables.rb', line 21 def run(context, autovivify = false) @context.with(context) do |ctx| ctx.set_value(self.path, @select.nil? ? @actions : @select ) end end |