Class: Sandy::Provider::PSEG::Report
- Inherits:
-
Object
- Object
- Sandy::Provider::PSEG::Report
- Includes:
- CoordinateCache
- Defined in:
- lib/sandy/providers/pseg/report.rb
Instance Attribute Summary collapse
-
#areas ⇒ Object
readonly
Returns the value of attribute areas.
Instance Method Summary collapse
-
#initialize ⇒ Report
constructor
A new instance of Report.
Methods included from CoordinateCache
#cached_coordinates_for, #gps_data
Constructor Details
#initialize ⇒ Report
Returns a new instance of Report.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/sandy/providers/pseg/report.rb', line 10 def initialize parser = XML::Parser.new parser.string = HTTParty.get(pseg_url).to_s raw_report = parser.parse @areas = parse raw_report rescue raise LoadError, "PSEG response was not recognizable." end |
Instance Attribute Details
#areas ⇒ Object (readonly)
Returns the value of attribute areas.
8 9 10 |
# File 'lib/sandy/providers/pseg/report.rb', line 8 def areas @areas end |