Sha256: a5a93fa6b3a99201ea55e4cc6ff1ad5a0d1ffdab2ebfa0f75181c13be43f2225

Contents?: true

Size: 331 Bytes

Versions: 4

Compression:

Stored size: 331 Bytes

Contents

# frozen_string_literal: true

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

4 entries across 4 versions & 1 rubygems

Version Path
jp_prefecture-1.1.1 lib/jp_prefecture/mapping.rb
jp_prefecture-1.1.0 lib/jp_prefecture/mapping.rb
jp_prefecture-1.0.0 lib/jp_prefecture/mapping.rb
jp_prefecture-1.0.0.rc1 lib/jp_prefecture/mapping.rb