Sha256: cac113f04334ff1535729e50bbe88a156ed3663569167cb1a6bcd4e45646b0e3
Contents?: true
Size: 773 Bytes
Versions: 2
Compression:
Stored size: 773 Bytes
Contents
module Nowtv class Region @prefectures = %w{ hokkaido aomori iwate miyagi akita yamagata fukushima ibaraki tochigi gunma saitama chiba tokyo kanagawa niigata toyama ishikawa fukui yamanashi nagano figu shizuoka aichi mie shiga kyoto osaka hyogo nara wakayama tottori shimane okayama hiroshima yamaguchi tokushima kagawa ehime kochi fukuoka saga nagasaki kumamoto oita miyazaki kagoshima okinawa } def self.get_region_id(prefecture) prefecture = prefecture.downcase @prefectures.include?(prefecture) ? @prefectures.index(prefecture) + 1 : 0 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nowtv-0.0.4 | lib/nowtv/region.rb |
nowtv-0.0.3 | lib/nowtv/region.rb |