Class: GeoSpider::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/geo-spider/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Location

Returns a new instance of Location.



7
8
9
10
11
12
13
14
# File 'lib/geo-spider/location.rb', line 7

def initialize(params = {})
  raise "No longitude provided" unless params[:longitude]
  raise "No latitude provided" unless params[:latitude]
  
  @latitude = params[:latitude]
  @longitude = params[:longitude]
  @title = params[:title]
end

Instance Attribute Details

#latitudeObject (readonly)

Returns the value of attribute latitude.



5
6
7
# File 'lib/geo-spider/location.rb', line 5

def latitude
  @latitude
end

#longitudeObject (readonly)

Returns the value of attribute longitude.



5
6
7
# File 'lib/geo-spider/location.rb', line 5

def longitude
  @longitude
end

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/geo-spider/location.rb', line 5

def title
  @title
end