Class: Easee::Site

Inherits:
Object
  • Object
show all
Defined in:
lib/easee/site.rb

Instance Method Summary collapse

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

#areaObject



11
# File 'lib/easee/site.rb', line 11

def area = address.fetch(:area)

#building_numberObject



9
# File 'lib/easee/site.rb', line 9

def building_number = address.fetch(:buildingNumber)

#country_idObject



12
# File 'lib/easee/site.rb', line 12

def country_id = country[:id]

#latitudeObject



13
# File 'lib/easee/site.rb', line 13

def latitude = address.fetch(:latitude)

#longitudeObject



14
# File 'lib/easee/site.rb', line 14

def longitude = address.fetch(:longitude)

#nameObject



7
# File 'lib/easee/site.rb', line 7

def name = @data.fetch(:name)

#streetObject



8
# File 'lib/easee/site.rb', line 8

def street = address.fetch(:street)

#zipObject



10
# File 'lib/easee/site.rb', line 10

def zip = address.fetch(:zip)