class ItamaeMitsurin::Resource::Link
Public Instance Methods
action_create(options)
click to toggle source
# File lib/itamae-mitsurin/resource/link.rb, line 26 def action_create(options) unless run_specinfra(:check_file_is_linked_to, attributes.link, attributes.to) run_specinfra(:link_file_to, attributes.link, attributes.to, force: attributes.force) end end
pre_action()
click to toggle source
# File lib/itamae-mitsurin/resource/link.rb, line 11 def pre_action case @current_action when :create attributes.exist = true end end
set_current_attributes()
click to toggle source
# File lib/itamae-mitsurin/resource/link.rb, line 18 def set_current_attributes current.exist = run_specinfra(:check_file_is_link, attributes.link) if current.exist current.to = run_specinfra(:get_file_link_target, attributes.link).stdout.strip end end