Class: GreenButton::Parser::GbDataFeed
- Inherits:
-
Object
- Object
- GreenButton::Parser::GbDataFeed
- Includes:
- SAXMachine
- Defined in:
- lib/ce-greenbutton/elements/gb_data_feed.rb
Overview
a sax-machine mapping for the espi:DataFeed structure
For example:
data_feed = GbDataFeed.parse(open(data_feed.xml))
Author: ahmed.seddiq Version: 1.0
Instance Method Summary collapse
-
#get_related(entry, type) ⇒ Object
Get the related entry to the given entry of the given type.
Instance Method Details
#get_related(entry, type) ⇒ Object
Get the related entry to the given entry of the given type
entry - the parent entry. type - the type of the required entry,e.g. ‘MeterReading’
Note: This method should be only called on instances returned from Parser.parse method.
Returns the related GbEntry
28 29 30 31 |
# File 'lib/ce-greenbutton/elements/gb_data_feed.rb', line 28 def (entry, type) = entry.[type] unless entry..nil? self.entries[] end |