Class: Resource::Execute
Instance Method Summary collapse
- #command(string) ⇒ Object
-
#initialize(title, &block) ⇒ Execute
constructor
A new instance of Execute.
- #run ⇒ Object
Methods inherited from Base
inherited, #not_if, #set_base_defaults, #should_skip?, #unix_mode
Methods included from ClassAttr
Methods included from BlockAttr
Constructor Details
#initialize(title, &block) ⇒ Execute
Returns a new instance of Execute.
7 8 9 10 11 12 13 |
# File 'lib/resource/execute.rb', line 7 def initialize title, &block set_base_defaults @path = nil @commands = [] @title = title self.instance_eval(&block) end |
Instance Method Details
#command(string) ⇒ Object
15 16 17 |
# File 'lib/resource/execute.rb', line 15 def command string @commands << { :command => string, :path => @path } end |