Class: CronFormat
- Inherits:
-
Object
- Object
- CronFormat
- Defined in:
- lib/cron_format.rb
Instance Attribute Summary collapse
-
#to_expression ⇒ Object
readonly
Returns the value of attribute to_expression.
-
#to_time ⇒ Object
readonly
Returns the value of attribute to_time.
Instance Method Summary collapse
-
#initialize(cron_string, now = Time.now) ⇒ CronFormat
constructor
A new instance of CronFormat.
- #next ⇒ Object
Constructor Details
#initialize(cron_string, now = Time.now) ⇒ CronFormat
Returns a new instance of CronFormat.
20 21 22 23 |
# File 'lib/cron_format.rb', line 20 def initialize(cron_string, now=Time.now) @cron_string, @to_time = cron_string, now parse() end |
Instance Attribute Details
#to_expression ⇒ Object (readonly)
Returns the value of attribute to_expression.
18 19 20 |
# File 'lib/cron_format.rb', line 18 def to_expression @to_expression end |
#to_time ⇒ Object (readonly)
Returns the value of attribute to_time.
18 19 20 |
# File 'lib/cron_format.rb', line 18 def to_time @to_time end |
Instance Method Details
#next ⇒ Object
25 26 27 28 29 30 |
# File 'lib/cron_format.rb', line 25 def next() nudge() #unless @cron_string =~ %r{/} #puts ':to_time : ' + @to_time.inspect parse() end |