Class: CEML::Circle
- Inherits:
-
Struct
- Object
- Struct
- CEML::Circle
- Defined in:
- lib/ceml/models/cast.rb
Instance Attribute Summary collapse
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lng ⇒ Object
Returns the value of attribute lng.
-
#radius ⇒ Object
Returns the value of attribute radius.
Instance Method Summary collapse
Instance Attribute Details
#lat ⇒ Object
Returns the value of attribute lat
96 97 98 |
# File 'lib/ceml/models/cast.rb', line 96 def lat @lat end |
#lng ⇒ Object
Returns the value of attribute lng
96 97 98 |
# File 'lib/ceml/models/cast.rb', line 96 def lng @lng end |
#radius ⇒ Object
Returns the value of attribute radius
96 97 98 |
# File 'lib/ceml/models/cast.rb', line 96 def radius @radius end |
Instance Method Details
#center ⇒ Object
97 |
# File 'lib/ceml/models/cast.rb', line 97 def center; Geokit::LatLng(lat, lng); end |
#contains?(*ll) ⇒ Boolean
98 99 100 |
# File 'lib/ceml/models/cast.rb', line 98 def contains?(*ll) center.distance_to(Geokit::LatLng(*ll), :meters) <= radius end |