Class: MPXJ::CalendarWeek

Inherits:
Container show all
Defined in:
lib/mpxj/calendar_week.rb

Overview

Represents a working week

Instance Attribute Summary collapse

Attributes inherited from Container

#attribute_values, #parent_project

Instance Method Summary collapse

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

#daysObject (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_fromTime

Retrieve the date from which this working week is in effect

Returns:

  • (Time)

    effective from date



21
22
23
# File 'lib/mpxj/calendar_week.rb', line 21

def effective_from
  get_date_value(attribute_values['effective_from'])
end

#effective_toTime

Retrieve the date to which this working week is in effect

Returns:

  • (Time)

    effective to date



28
29
30
# File 'lib/mpxj/calendar_week.rb', line 28

def effective_to
  get_date_value(attribute_values['effective_to'])
end

#nameString

Retrieve the exception name

Returns:

  • (String)

    the exception name



14
15
16
# File 'lib/mpxj/calendar_week.rb', line 14

def name
  attribute_values['name']
end