Class: WheneverDelorean
- Inherits:
-
Object
- Object
- WheneverDelorean
- Defined in:
- lib/whenever-delorean.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(time, options) ⇒ WheneverDelorean
constructor
A new instance of WheneverDelorean.
- #time_travel ⇒ Object
Constructor Details
#initialize(time, options) ⇒ WheneverDelorean
Returns a new instance of WheneverDelorean.
8 9 10 11 12 |
# File 'lib/whenever-delorean.rb', line 8 def initialize(time, ) @destination_time = parse_date(time) @match = [:only] raise 'must set the :only => //, option' unless @match end |
Class Method Details
.time_travel_to(*arguments) ⇒ Object
14 15 16 |
# File 'lib/whenever-delorean.rb', line 14 def self.time_travel_to(*arguments) WheneverDelorean.new(*arguments).time_travel end |
Instance Method Details
#time_travel ⇒ Object
18 19 20 21 |
# File 'lib/whenever-delorean.rb', line 18 def time_travel run_jobs Delorean.time_travel_to(destination_time) end |