Class: MPXJ::CalendarWeek
- Defined in:
- lib/mpxj/calendar_week.rb
Overview
Represents a working week
Instance Attribute Summary collapse
-
#days ⇒ Object
readonly
Returns the value of attribute days.
Attributes inherited from Container
#attribute_values, #parent_project
Instance Method Summary collapse
-
#effective_from ⇒ Time
Retrieve the date from which this working week is in effect.
-
#effective_to ⇒ Time
Retrieve the date to which this working week is in effect.
-
#initialize(parent_project, attribute_values) ⇒ CalendarWeek
constructor
A new instance of CalendarWeek.
-
#name ⇒ String
Retrieve the exception name.
Constructor Details
#initialize(parent_project, attribute_values) ⇒ CalendarWeek
Returns a new instance of CalendarWeek.
6 7 8 9 |
# File 'lib/mpxj/calendar_week.rb', line 6 def initialize(parent_project, attribute_values) super(parent_project, attribute_values.slice('name', 'effective_from', 'effective_to')) process_days(attribute_values) end |
Instance Attribute Details
#days ⇒ Object (readonly)
Returns the value of attribute days.
4 5 6 |
# File 'lib/mpxj/calendar_week.rb', line 4 def days @days end |
Instance Method Details
#effective_from ⇒ Time
Retrieve the date from which this working week is in effect
21 22 23 |
# File 'lib/mpxj/calendar_week.rb', line 21 def effective_from get_date_value(attribute_values['effective_from']) end |
#effective_to ⇒ Time
Retrieve the date to which this working week is in effect
28 29 30 |
# File 'lib/mpxj/calendar_week.rb', line 28 def effective_to get_date_value(attribute_values['effective_to']) end |
#name ⇒ String
Retrieve the exception name
14 15 16 |
# File 'lib/mpxj/calendar_week.rb', line 14 def name attribute_values['name'] end |