Class: Itamae::Resource::Execute

Inherits:
Base
  • Object
show all
Defined in:
lib/itamae/resource/execute.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes, #current_attributes, #notifications, #recipe, #resource_name, #subscriptions, #updated

Instance Method Summary collapse

Methods inherited from Base

#action_nothing, define_attribute, inherited, #initialize, #resource_type, #run

Constructor Details

This class inherits a constructor from Itamae::Resource::Base

Instance Method Details

#action_run(options) ⇒ Object



20
21
22
23
# File 'lib/itamae/resource/execute.rb', line 20

def action_run(options)
  run_command(attributes.command)
  updated!
end

#pre_actionObject



9
10
11
12
13
14
# File 'lib/itamae/resource/execute.rb', line 9

def pre_action
  case @current_action
  when :run
    attributes.executed = true
  end
end

#set_current_attributesObject



16
17
18
# File 'lib/itamae/resource/execute.rb', line 16

def set_current_attributes
  current.executed = false
end