Class: Fabulator::Core::Actions::Value

Inherits:
Action
  • Object
show all
Defined in:
lib/fabulator/core/actions/variables.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/fabulator/core/actions/variables.rb', line 14

def name
  @name
end

#selectObject

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