Class: Resource::Cron

Inherits:
Base
  • Object
show all
Defined in:
lib/resource/cron.rb

Instance Method Summary collapse

Methods inherited from Base

inherited, #not_if, #set_base_defaults, #should_skip?, #unix_mode

Methods included from ClassAttr

included

Methods included from BlockAttr

included

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_titleObject



13
14
15
# File 'lib/resource/cron.rb', line 13

def get_title
  @title
end

#runObject



17
18
19
# File 'lib/resource/cron.rb', line 17

def run
  @command
end