Class: CronEdit::DummyCrontab
Overview
DummyCrontab allows you to create crontab definitions from scratch and dump them out as string. (Or combine them with other Crontab definitions)
Example:
fc = DummyCrontab.new
fc.add 'agent1', '59 * * * * echo "agent1"'
fc.add 'agent2', {:hour=>'2',:command=>'echo "huh"'}
fc.commit
puts fc
Instance Method Summary collapse
-
#initialize ⇒ DummyCrontab
constructor
A new instance of DummyCrontab.
- #to_s ⇒ Object
Methods inherited from Crontab
Add, List, Merge, Remove, Subtract, #add, #clear!, #commit, #list, #listFull, #listRaw, #merge, #remove, #review, #rollback, #setIO, #subtract
Constructor Details
#initialize ⇒ DummyCrontab
Returns a new instance of DummyCrontab.
358 359 360 361 |
# File 'lib/cronedit.rb', line 358 def initialize super nil @buffer = StringIO.new end |
Instance Method Details
#to_s ⇒ Object
363 364 365 |
# File 'lib/cronedit.rb', line 363 def to_s @buffer.string end |