Class: XTeamSchedule::Parser
- Inherits:
-
Object
- Object
- XTeamSchedule::Parser
- Defined in:
- lib/xteam_schedule/facilitation/parser.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
Returns the value of attribute hash.
-
#schedule ⇒ Object
Returns the value of attribute schedule.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(hash) ⇒ Parser
Returns a new instance of Parser.
9 10 11 12 |
# File 'lib/xteam_schedule/facilitation/parser.rb', line 9 def initialize(hash) self.hash = hash self.schedule = XTeamSchedule::Schedule.create! end |
Instance Attribute Details
#hash ⇒ Object
Returns the value of attribute hash.
3 4 5 |
# File 'lib/xteam_schedule/facilitation/parser.rb', line 3 def hash @hash end |
#schedule ⇒ Object
Returns the value of attribute schedule.
3 4 5 |
# File 'lib/xteam_schedule/facilitation/parser.rb', line 3 def schedule @schedule end |
Class Method Details
.parse(hash) ⇒ Object
5 6 7 |
# File 'lib/xteam_schedule/facilitation/parser.rb', line 5 def self.parse(hash) new(hash).parse end |
Instance Method Details
#parse ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/xteam_schedule/facilitation/parser.rb', line 14 def parse parse_resource_groups! parse_resources! parse_assignment_groups! parse_assignments! parse_working_times! parse_interface! parse_weekly_working_schedule! parse_holidays! parse_schedule! schedule end |