Class: INat::Data::Types::Sector
- Inherits:
-
Object
- Object
- INat::Data::Types::Sector
- Defined in:
- lib/inat/data/types/location.rb
Instance Attribute Summary collapse
-
#east ⇒ Object
readonly
Returns the value of attribute east.
-
#north ⇒ Object
readonly
Returns the value of attribute north.
-
#south ⇒ Object
readonly
Returns the value of attribute south.
-
#west ⇒ Object
readonly
Returns the value of attribute west.
Instance Method Summary collapse
-
#initialize(north, east, south, west) ⇒ Sector
constructor
A new instance of Sector.
Constructor Details
#initialize(north, east, south, west) ⇒ Sector
Returns a new instance of Sector.
76 77 78 79 80 81 82 |
# File 'lib/inat/data/types/location.rb', line 76 def initialize north, east, south, west raise ArgumentError, "North must be a Numeric!", caller unless Numeric === north raise ArgumentError, "East must be a Numeric!", caller unless Numeric === east raise ArgumentError, "South must be a Numeric!", caller unless Numeric === south raise ArgumentError, "West must be a Numeric!", caller unless Numeric === west @north, @east, @south, @west = north, east, south, west end |
Instance Attribute Details
#east ⇒ Object (readonly)
Returns the value of attribute east.
74 75 76 |
# File 'lib/inat/data/types/location.rb', line 74 def east @east end |
#north ⇒ Object (readonly)
Returns the value of attribute north.
74 75 76 |
# File 'lib/inat/data/types/location.rb', line 74 def north @north end |
#south ⇒ Object (readonly)
Returns the value of attribute south.
74 75 76 |
# File 'lib/inat/data/types/location.rb', line 74 def south @south end |
#west ⇒ Object (readonly)
Returns the value of attribute west.
74 75 76 |
# File 'lib/inat/data/types/location.rb', line 74 def west @west end |