Class: GreenButtonClasses::LocalTimeParameters

Inherits:
GreenButtonEntry show all
Defined in:
lib/greenbutton/gb_classes.rb

Instance Attribute Summary collapse

Attributes inherited from GreenButtonEntry

#href, #id, #other_related, #parent_href, #published, #related_hrefs, #title, #updated

Instance Method Summary collapse

Methods inherited from GreenButtonEntry

#add_related, #assign_rules, #doc, #find_by_href, #find_related_entries, #initialize, #parse_related_entry

Constructor Details

This class inherits a constructor from GreenButtonClasses::GreenButtonEntry

Instance Attribute Details

#usage_pointObject

Returns the value of attribute usage_point.



247
248
249
# File 'lib/greenbutton/gb_classes.rb', line 247

def usage_point
  @usage_point
end

Instance Method Details

#additional_rulesObject



253
254
255
256
257
258
259
260
# File 'lib/greenbutton/gb_classes.rb', line 253

def additional_rules
  [
    Rule.new(:dst_end_rule, ".//dstEndRule", :string),
    Rule.new(:dst_offset, ".//dstOffset", :integer),
    Rule.new(:dst_start_rule, ".//dstStartRule", :string),
    Rule.new(:tz_offset, ".//tzOffset", :integer)
  ]
end

#pre_rule_assignment(parent) ⇒ Object



249
250
251
# File 'lib/greenbutton/gb_classes.rb', line 249

def pre_rule_assignment(parent)
  self.usage_point = parent
end