Class: App42::Geo::Point
- Inherits:
-
Object
- Object
- App42::Geo::Point
- Defined in:
- lib/geo/Geo.rb
Instance Attribute Summary collapse
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lng ⇒ Object
Returns the value of attribute lng.
-
#marker ⇒ Object
Returns the value of attribute marker.
Instance Method Summary collapse
-
#initialize(geo) ⇒ Point
constructor
This is a constructor that takes no parameter.
-
#to_s ⇒ Object
Returns the Geo Response in JSON format.
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
#lat ⇒ Object
Returns the value of attribute lat.
26 27 28 |
# File 'lib/geo/Geo.rb', line 26 def lat @lat end |
#lng ⇒ Object
Returns the value of attribute lng.
26 27 28 |
# File 'lib/geo/Geo.rb', line 26 def lng @lng end |
#marker ⇒ Object
Returns the value of attribute marker.
26 27 28 |
# File 'lib/geo/Geo.rb', line 26 def marker @marker end |
Instance Method Details
#to_s ⇒ Object
Returns the Geo 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 |