Class: Resource::Cron
Instance Method Summary collapse
- #get_title ⇒ Object
-
#initialize(title, &block) ⇒ Cron
constructor
A new instance of Cron.
- #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) ⇒ Cron
Returns a new instance of Cron.
7 8 9 10 11 |
# File 'lib/resource/cron.rb', line 7 def initialize title, &block @command = '' @title = title self.instance_eval(&block) end |
Instance Method Details
#get_title ⇒ Object
13 14 15 |
# File 'lib/resource/cron.rb', line 13 def get_title @title end |
#run ⇒ Object
17 18 19 |
# File 'lib/resource/cron.rb', line 17 def run @command end |