Class: GreenButtonClasses::ReadingType
- Inherits:
-
GreenButtonEntry
- Object
- GreenButtonEntry
- GreenButtonClasses::ReadingType
- Defined in:
- lib/greenbutton/gb_classes.rb
Constant Summary collapse
- ATTRS =
['accumulationBehaviour', 'commodity', 'currency', 'dataQualifier', 'flowDirection', 'intervalLength', 'kind', 'phase', 'powerOfTenMultiplier', 'timeAttribute', 'uom']
Instance Attribute Summary collapse
-
#meter_reading ⇒ Object
Returns the value of attribute meter_reading.
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, #find_by_href, #find_related_entries, #initialize, #parse_related_entry
Constructor Details
This class inherits a constructor from GreenButtonClasses::GreenButtonEntry
Instance Attribute Details
#meter_reading ⇒ Object
Returns the value of attribute meter_reading.
190 191 192 |
# File 'lib/greenbutton/gb_classes.rb', line 190 def meter_reading @meter_reading end |
Instance Method Details
#additional_rules ⇒ Object
202 203 204 205 206 207 208 |
# File 'lib/greenbutton/gb_classes.rb', line 202 def additional_rules rules = [] ATTRS.each do |attr| rules << Rule.new( Helper.underscore(attr).to_sym, './/'+attr, :integer ) end rules end |
#doc ⇒ Object
198 199 200 |
# File 'lib/greenbutton/gb_classes.rb', line 198 def doc self.meter_reading.doc end |
#pre_rule_assignment(parent) ⇒ Object
194 195 196 |
# File 'lib/greenbutton/gb_classes.rb', line 194 def pre_rule_assignment(parent) self.meter_reading = parent end |