Class: Bort::Schedule::HolidayData
- Inherits:
-
Object
- Object
- Bort::Schedule::HolidayData
- Defined in:
- lib/bort/schedule.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#name ⇒ Object
Returns the value of attribute name.
-
#schedule_type ⇒ Object
Returns the value of attribute schedule_type.
Class Method Summary collapse
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
153 154 155 |
# File 'lib/bort/schedule.rb', line 153 def date @date end |
#name ⇒ Object
Returns the value of attribute name.
153 154 155 |
# File 'lib/bort/schedule.rb', line 153 def name @name end |
#schedule_type ⇒ Object
Returns the value of attribute schedule_type.
153 154 155 |
# File 'lib/bort/schedule.rb', line 153 def schedule_type @schedule_type end |
Class Method Details
.parse(doc) ⇒ Object
155 156 157 158 159 160 161 162 |
# File 'lib/bort/schedule.rb', line 155 def self.parse(doc) data = HolidayData.new data.name = (doc/:name).inner_text data.date = Date.parse((doc/:date).inner_text) data.schedule_type = (doc/:schedule_type).inner_text data end |