Method: Itamae::Resource::LocalRubyBlock#action_run

Defined in:
lib/itamae/resource/local_ruby_block.rb

#action_run(options) ⇒ Object


7
8
9
10
11
12
13
14
15
# File 'lib/itamae/resource/local_ruby_block.rb', line 7

def action_run(options)
  if attributes[:cwd]
    Dir.chdir(attributes[:cwd]) do
      attributes.block.call
    end
  else
    attributes.block.call
  end
end