Sha256: 6dce846339c190ca0b6bdef77ee1951e83680de4f242f389a793084b4993621e

Contents?: true

Size: 317 Bytes

Versions: 9

Compression:

Stored size: 317 Bytes

Contents

# coding: utf-8
require 'yaml'

module JpPrefecture
  # コードと都道府県のマッピング
  module Mapping

    filepath = File.join(File.dirname(__FILE__), '../../data/prefecture.yml')
    @data = YAML.load_file(filepath)

    def self.data
      JpPrefecture.config.mapping_data || @data
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jp_prefecture-0.11.0 lib/jp_prefecture/mapping.rb
jp_prefecture-0.10.0 lib/jp_prefecture/mapping.rb
jp_prefecture-0.9.0 lib/jp_prefecture/mapping.rb
jp_prefecture-0.8.1 lib/jp_prefecture/mapping.rb
jp_prefecture-0.8.0 lib/jp_prefecture/mapping.rb
jp_prefecture-0.7.0 lib/jp_prefecture/mapping.rb
jp_prefecture-0.6.0 lib/jp_prefecture/mapping.rb
jp_prefecture-0.5.0 lib/jp_prefecture/mapping.rb
jp_prefecture-0.4.0 lib/jp_prefecture/mapping.rb