Class: Itamae::Plugin::Resource::RvmInstall

Inherits:
Resource::Base
  • Object
show all
Defined in:
lib/itamae/plugin/resource/rvm_install.rb

Instance Method Summary collapse

Instance Method Details

#action_install(options) ⇒ Object



17
18
19
20
21
# File 'lib/itamae/plugin/resource/rvm_install.rb', line 17

def action_install(options)
  command = "/bin/bash --login -c 'rvm install #{attributes.ruby_version}'"
  run_command(command)
  updated!
end

#pre_actionObject



6
7
8
9
10
11
# File 'lib/itamae/plugin/resource/rvm_install.rb', line 6

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

#set_current_attributesObject



13
14
15
# File 'lib/itamae/plugin/resource/rvm_install.rb', line 13

def set_current_attributes
  current.executed = false
end