Class: ScheduleAttributes::RuleParser::Base
- Inherits:
-
Object
- Object
- ScheduleAttributes::RuleParser::Base
- Defined in:
- lib/schedule_attributes/rule_parser/base.rb
Instance Attribute Summary collapse
-
#input ⇒ Object
readonly
Returns the value of attribute input.
Instance Method Summary collapse
- #exceptions ⇒ Object
-
#initialize(input) ⇒ Base
constructor
A new instance of Base.
- #rule ⇒ Object
Constructor Details
#initialize(input) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 |
# File 'lib/schedule_attributes/rule_parser/base.rb', line 5 def initialize(input) @input = input @rule ||= rule_factory.daily(input.interval) @exceptions ||= [] end |
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
11 12 13 |
# File 'lib/schedule_attributes/rule_parser/base.rb', line 11 def input @input end |
Instance Method Details
#exceptions ⇒ Object
21 22 23 24 25 |
# File 'lib/schedule_attributes/rule_parser/base.rb', line 21 def exceptions set_yearly_month_exceptions @exceptions end |
#rule ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/schedule_attributes/rule_parser/base.rb', line 13 def rule set_end_date set_yearly_months @rule end |