Class: Location
- Inherits:
-
Object
- Object
- Location
- Defined in:
- lib/lita/handlers/location.rb
Instance Attribute Summary collapse
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#location_name ⇒ Object
Returns the value of attribute location_name.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
Instance Method Summary collapse
-
#initialize(location_name, latitude, longitude) ⇒ Location
constructor
A new instance of Location.
- #to_s ⇒ Object
Constructor Details
#initialize(location_name, latitude, longitude) ⇒ Location
4 5 6 7 8 |
# File 'lib/lita/handlers/location.rb', line 4 def initialize (location_name, latitude, longitude) self.location_name = location_name self.latitude = latitude self.longitude = longitude end |
Instance Attribute Details
#latitude ⇒ Object
Returns the value of attribute latitude.
2 3 4 |
# File 'lib/lita/handlers/location.rb', line 2 def latitude @latitude end |
#location_name ⇒ Object
Returns the value of attribute location_name.
2 3 4 |
# File 'lib/lita/handlers/location.rb', line 2 def location_name @location_name end |
#longitude ⇒ Object
Returns the value of attribute longitude.
2 3 4 |
# File 'lib/lita/handlers/location.rb', line 2 def longitude @longitude end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/lita/handlers/location.rb', line 10 def to_s "Location: #{self.location_name} #{self.latitude},#{self.longitude}" end |