Class: App42::Geo::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/geo/Geo.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(geo) ⇒ Point

This is a constructor that takes no parameter



31
32
33
# File 'lib/geo/Geo.rb', line 31

def initialize(geo)
  geo.pointList.push(self);
end

Instance Attribute Details

#latObject

Returns the value of attribute lat.



26
27
28
# File 'lib/geo/Geo.rb', line 26

def lat
  @lat
end

#lngObject

Returns the value of attribute lng.



26
27
28
# File 'lib/geo/Geo.rb', line 26

def lng
  @lng
end

#markerObject

Returns the value of attribute marker.



26
27
28
# File 'lib/geo/Geo.rb', line 26

def marker
  @marker
end

Instance Method Details

#to_sObject

Returns the Geo Response in JSON format.

Returns:

  • the response in JSON format.



45
46
47
# File 'lib/geo/Geo.rb', line 45

def to_s
  return "Lat : #{@lat}" + "Long : #{@lng}" + "Marker : #{@marker}";
end