Sha256: edd8a13c2a285f9021b3eaa9316803cc24139841fef58969b993aea0f3aa8e26

Contents?: true

Size: 630 Bytes

Versions: 2

Compression:

Stored size: 630 Bytes

Contents

module MapKit
  class MapType
    def self.mkmap_to_rmap(map_type)
      case map_type
        when MKMapTypeStandard
          :standard
        when MKMapTypeSatellite
          :satellite
        when MKMapTypeHybrid
          :hybrid
        else
          raise "Unknown map type: #{map_type.inspect}"
      end
    end

    def self.rmap_to_mkmap(map_type)
      case map_type
        when :standard
          MKMapTypeStandard
        when :satellite
          MKMapTypeSatellite
        when :hybrid
          MKMapTypeHybrid
        else
          raise "Unknown map type: #{map_type.inspect}"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
map-kit-wrapper-0.0.4 lib/map-kit-wrapper/map_type.rb
map-kit-wrapper-0.0.3 lib/map-kit-wrapper/map_type.rb