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 = {}, &block) ⇒ Object
Constructor Details
#initialize(rule, value, rule_part) ⇒ InputAlignment
Returns a new instance of InputAlignment.
4 5 6 7 8 |
# File 'lib/ice_cube/input_alignment.rb', line 4 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.
10 11 12 |
# File 'lib/ice_cube/input_alignment.rb', line 10 def rule @rule end |
#rule_part ⇒ Object (readonly)
Returns the value of attribute rule_part.
10 11 12 |
# File 'lib/ice_cube/input_alignment.rb', line 10 def rule_part @rule_part end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/ice_cube/input_alignment.rb', line 10 def value @value end |
Instance Method Details
#verify(freq, options = {}, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ice_cube/input_alignment.rb', line 12 def verify(freq, ={}, &block) @rule.validations[:interval] or return case @rule when DailyRule verify_wday_alignment(freq, &block) when MonthlyRule verify_month_alignment(freq, &block) else verify_freq_alignment(freq, &block) end end |