class MPXJ::Container
Base class from which all project entities are derived
Attributes
attribute_values[R]
parent_project[R]
Public Class Methods
new(parent_project, attribute_values)
click to toggle source
# File lib/mpxj/container.rb, line 7 def initialize(parent_project, attribute_values) @parent_project = parent_project @attribute_values = attribute_values end
Private Instance Methods
get_boolean_value(attribute_value)
click to toggle source
# File lib/mpxj/container.rb, line 48 def get_boolean_value(attribute_value) attribute_value == true end
get_date_value(attribute_value)
click to toggle source
# File lib/mpxj/container.rb, line 24 def get_date_value(attribute_value) if attribute_value.nil? nil else @parent_project.zone.parse(attribute_value) end end
get_duration_value(attribute_value)
click to toggle source
# File lib/mpxj/container.rb, line 16 def get_duration_value(attribute_value) if attribute_value.nil? 0.0 else attribute_value.to_f end end
get_float_value(attribute_value)
click to toggle source
# File lib/mpxj/container.rb, line 32 def get_float_value(attribute_value) if attribute_value.nil? 0.0 else attribute_value.to_f end end
get_integer_value(attribute_value)
click to toggle source
# File lib/mpxj/container.rb, line 40 def get_integer_value(attribute_value) if attribute_value.nil? 0 else attribute_value.to_i end end