Sha256: 80bce22cb73551e247383b16f7c57eac5c1d69bdfcc7d33e83c4b3ca9ca4af8c
Contents?: true
Size: 508 Bytes
Versions: 26
Compression:
Stored size: 508 Bytes
Contents
require 'itamae' module Itamae module Resource class Execute < Base define_attribute :action, default: :run define_attribute :command, type: String, default_name: true def pre_action case @current_action when :run attributes.executed = true end end def set_current_attributes current.executed = false end def action_run(options) run_command(attributes.command) updated! end end end end
Version data entries
26 entries across 26 versions & 2 rubygems