Class: MPXJ::CalendarException
- Defined in:
- lib/mpxj/calendar_exception.rb
Overview
Represents a calendar exception
Instance Attribute Summary collapse
-
#hours ⇒ Object
readonly
Returns the value of attribute hours.
Attributes inherited from Container
#attribute_values, #parent_project
Instance Method Summary collapse
-
#from ⇒ Time
Retrieve the date on which this exception starts.
-
#initialize(parent_project, attribute_values) ⇒ CalendarException
constructor
A new instance of CalendarException.
-
#name ⇒ String
Retrieve the exception name.
-
#to ⇒ Time
Retrieve the date on which this exception ends.
-
#type ⇒ String
Retrieve the exception type.
Constructor Details
#initialize(parent_project, attribute_values) ⇒ CalendarException
Returns a new instance of CalendarException.
6 7 8 9 |
# File 'lib/mpxj/calendar_exception.rb', line 6 def initialize(parent_project, attribute_values) super(parent_project, attribute_values.slice('name', 'from', 'to', 'type')) process_hours(attribute_values) end |
Instance Attribute Details
#hours ⇒ Object (readonly)
Returns the value of attribute hours.
4 5 6 |
# File 'lib/mpxj/calendar_exception.rb', line 4 def hours @hours end |
Instance Method Details
#from ⇒ Time
Retrieve the date on which this exception starts
21 22 23 |
# File 'lib/mpxj/calendar_exception.rb', line 21 def from get_date_value(attribute_values['from']) end |
#name ⇒ String
Retrieve the exception name
14 15 16 |
# File 'lib/mpxj/calendar_exception.rb', line 14 def name attribute_values['name'] end |
#to ⇒ Time
Retrieve the date on which this exception ends
28 29 30 |
# File 'lib/mpxj/calendar_exception.rb', line 28 def to get_date_value(attribute_values['to']) end |
#type ⇒ String
Retrieve the exception type
35 36 37 |
# File 'lib/mpxj/calendar_exception.rb', line 35 def type attribute_values['type'] end |