Class: INat::Data::Types::Sector

Inherits:
Object
  • Object
show all
Defined in:
lib/inat/data/types/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(north, east, south, west) ⇒ Sector

Returns a new instance of Sector.

Raises:

  • (ArgumentError)


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

#eastObject (readonly)

Returns the value of attribute east.



74
75
76
# File 'lib/inat/data/types/location.rb', line 74

def east
  @east
end

#northObject (readonly)

Returns the value of attribute north.



74
75
76
# File 'lib/inat/data/types/location.rb', line 74

def north
  @north
end

#southObject (readonly)

Returns the value of attribute south.



74
75
76
# File 'lib/inat/data/types/location.rb', line 74

def south
  @south
end

#westObject (readonly)

Returns the value of attribute west.



74
75
76
# File 'lib/inat/data/types/location.rb', line 74

def west
  @west
end