Class: Easee::Site
- Inherits:
-
Object
- Object
- Easee::Site
- Defined in:
- lib/easee/site.rb
Instance Method Summary collapse
- #area ⇒ Object
- #building_number ⇒ Object
- #country_id ⇒ Object
-
#initialize(data) ⇒ Site
constructor
A new instance of Site.
- #latitude ⇒ Object
- #longitude ⇒ Object
- #name ⇒ Object
- #street ⇒ Object
- #zip ⇒ Object
Constructor Details
#initialize(data) ⇒ Site
Returns a new instance of Site.
3 4 5 |
# File 'lib/easee/site.rb', line 3 def initialize(data) @data = data.deep_symbolize_keys end |
Instance Method Details
#area ⇒ Object
11 |
# File 'lib/easee/site.rb', line 11 def area = address.fetch(:area) |
#building_number ⇒ Object
9 |
# File 'lib/easee/site.rb', line 9 def building_number = address.fetch(:buildingNumber) |
#country_id ⇒ Object
12 |
# File 'lib/easee/site.rb', line 12 def country_id = country[:id] |
#latitude ⇒ Object
13 |
# File 'lib/easee/site.rb', line 13 def latitude = address.fetch(:latitude) |
#longitude ⇒ Object
14 |
# File 'lib/easee/site.rb', line 14 def longitude = address.fetch(:longitude) |
#name ⇒ Object
7 |
# File 'lib/easee/site.rb', line 7 def name = @data.fetch(:name) |
#street ⇒ Object
8 |
# File 'lib/easee/site.rb', line 8 def street = address.fetch(:street) |
#zip ⇒ Object
10 |
# File 'lib/easee/site.rb', line 10 def zip = address.fetch(:zip) |