Class: When::CronRange
- Inherits:
-
Object
- Object
- When::CronRange
- Defined in:
- lib/when-cron/cron/cron_range.rb
Instance Attribute Summary collapse
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
Instance Method Summary collapse
- #==(int) ⇒ Object
-
#initialize(first, last) ⇒ CronRange
constructor
A new instance of CronRange.
Constructor Details
#initialize(first, last) ⇒ CronRange
5 6 7 8 |
# File 'lib/when-cron/cron/cron_range.rb', line 5 def initialize(first, last) @first = first @last = last end |
Instance Attribute Details
#first ⇒ Object (readonly)
Returns the value of attribute first.
3 4 5 |
# File 'lib/when-cron/cron/cron_range.rb', line 3 def first @first end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
3 4 5 |
# File 'lib/when-cron/cron/cron_range.rb', line 3 def last @last end |
Instance Method Details
#==(int) ⇒ Object
10 11 12 |
# File 'lib/when-cron/cron/cron_range.rb', line 10 def ==(int) @first <= int && @last >= int end |