Class: IceCube::InputAlignment
- Inherits:
-
Object
- Object
- IceCube::InputAlignment
- Defined in:
- lib/ice_cube/input_alignment.rb
Instance Attribute Summary collapse
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
-
#rule_part ⇒ Object
readonly
Returns the value of attribute rule_part.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(rule, value, rule_part) ⇒ InputAlignment
constructor
A new instance of InputAlignment.
- #verify(freq, options = {}) ⇒ Object
Constructor Details
#initialize(rule, value, rule_part) ⇒ InputAlignment
Returns a new instance of InputAlignment.
3 4 5 6 7 |
# File 'lib/ice_cube/input_alignment.rb', line 3 def initialize(rule, value, rule_part) @rule = rule @value = value @rule_part = rule_part end |
Instance Attribute Details
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
9 10 11 |
# File 'lib/ice_cube/input_alignment.rb', line 9 def rule @rule end |
#rule_part ⇒ Object (readonly)
Returns the value of attribute rule_part.
9 10 11 |
# File 'lib/ice_cube/input_alignment.rb', line 9 def rule_part @rule_part end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/ice_cube/input_alignment.rb', line 9 def value @value end |
Instance Method Details
#verify(freq, options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ice_cube/input_alignment.rb', line 11 def verify(freq, = {}, &) @rule.validations[:interval] or return case @rule when DailyRule verify_wday_alignment(freq, &) when MonthlyRule verify_month_alignment(freq, &) else verify_freq_alignment(freq, &) end end |