Class: INat::Data::Types::Radius
- Inherits:
-
Object
- Object
- INat::Data::Types::Radius
- Defined in:
- lib/inat/data/types/location.rb
Instance Attribute Summary collapse
-
#latitude ⇒ Object
readonly
Returns the value of attribute latitude.
-
#longitude ⇒ Object
readonly
Returns the value of attribute longitude.
-
#radius ⇒ Object
readonly
Returns the value of attribute radius.
Instance Method Summary collapse
-
#initialize(latitude, longitude, radius) ⇒ Radius
constructor
A new instance of Radius.
Constructor Details
#initialize(latitude, longitude, radius) ⇒ Radius
Returns a new instance of Radius.
63 64 65 66 67 68 |
# File 'lib/inat/data/types/location.rb', line 63 def initialize latitude, longitude, radius raise ArgumentError, "Latitude must be a Numeric!", caller unless Numeric === latitude raise ArgumentError, "Longitude must be a Numeric!", caller unless Numeric === longitude raise ArgumentError, "Radius must be a Numeric!", caller unless Numeric === radius || radius == nil @latitude, @longitude, @radius = latitude, longitude, radius end |
Instance Attribute Details
#latitude ⇒ Object (readonly)
Returns the value of attribute latitude.
61 62 63 |
# File 'lib/inat/data/types/location.rb', line 61 def latitude @latitude end |
#longitude ⇒ Object (readonly)
Returns the value of attribute longitude.
61 62 63 |
# File 'lib/inat/data/types/location.rb', line 61 def longitude @longitude end |
#radius ⇒ Object (readonly)
Returns the value of attribute radius.
61 62 63 |
# File 'lib/inat/data/types/location.rb', line 61 def radius @radius end |