Method: Resolv::LOC::Coord#initialize
- Defined in:
- lib/resolv.rb
#initialize(coordinates, orientation) ⇒ Coord
Returns a new instance of Coord.
2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 |
# File 'lib/resolv.rb', line 2744 def initialize(coordinates,orientation) unless coordinates.kind_of?(String) raise ArgumentError.new("Coord must be a 32bit unsigned integer in hex format: #{coordinates.inspect}") end unless orientation.kind_of?(String) && orientation[/^lon$|^lat$/] raise ArgumentError.new('Coord expects orientation to be a String argument of "lat" or "lon"') end @coordinates = coordinates @orientation = orientation end |