Class: Kamome::Models::General

Inherits:
Object
  • Object
show all
Defined in:
lib/kamome/models/general.rb

Overview

CSV Model: 読み仮名データの促音・拗音を小書きで表記するもの

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ General

Returns a new instance of General.



81
82
83
84
85
# File 'lib/kamome/models/general.rb', line 81

def initialize(params = {})
  params.each do |key, value|
    public_send("#{key}=", value)
  end
end

Instance Attribute Details

#ambiguous_streetBoolean

小字毎に番地が起番されている町域の場合 true

Returns:

  • (Boolean)


56
57
58
# File 'lib/kamome/models/general.rb', line 56

def ambiguous_street
  @ambiguous_street
end

#ambiguous_townBoolean

一町域が二以上の郵便番号で表される場合 true

Returns:

  • (Boolean)


51
52
53
# File 'lib/kamome/models/general.rb', line 51

def ambiguous_town
  @ambiguous_town
end

#ambiguous_zipcodeBoolean

一つの郵便番号で二以上の町域を表す場合 true

Returns:

  • (Boolean)


66
67
68
# File 'lib/kamome/models/general.rb', line 66

def ambiguous_zipcode
  @ambiguous_zipcode
end

#cityString

市区町村名 漢字

Returns:

  • (String)


41
42
43
# File 'lib/kamome/models/general.rb', line 41

def city
  @city
end

#city_kanaString

市区町村名 カナ

Returns:

  • (String)


26
27
28
# File 'lib/kamome/models/general.rb', line 26

def city_kana
  @city_kana
end

#codeString

全国地方公共団体コード(JIS X0401, X0402), 半角数値

Returns:

  • (String)


11
12
13
# File 'lib/kamome/models/general.rb', line 11

def code
  @code
end

#prefectureString

都道府県名 漢字

Returns:

  • (String)


36
37
38
# File 'lib/kamome/models/general.rb', line 36

def prefecture
  @prefecture
end

#prefecture_kanaString

都道府県名 カナ

Returns:

  • (String)


21
22
23
# File 'lib/kamome/models/general.rb', line 21

def prefecture_kana
  @prefecture_kana
end

#reasonInteger

変更理由 0: 変更なし, 1: 市政・区政・町政・分区・政令指定都市施行, 2: 住居表示の実施, 3: 区画整理, 4: 郵便区調整等, 5: 訂正, 6: 廃止

Returns:

  • (Integer)


79
80
81
# File 'lib/kamome/models/general.rb', line 79

def reason
  @reason
end

#required_chomeBoolean

丁目を有する町域の場合 true

Returns:

  • (Boolean)


61
62
63
# File 'lib/kamome/models/general.rb', line 61

def required_chome
  @required_chome
end

#stateInteger

更新の表示 0: 変更なし, 1: 変更あり, 2: 廃止

Returns:

  • (Integer)


72
73
74
# File 'lib/kamome/models/general.rb', line 72

def state
  @state
end

#townString

町域名 漢字

Returns:

  • (String)


46
47
48
# File 'lib/kamome/models/general.rb', line 46

def town
  @town
end

#town_kanaString

町域名 カナ

Returns:

  • (String)


31
32
33
# File 'lib/kamome/models/general.rb', line 31

def town_kana
  @town_kana
end

#zipcodeString

郵便番号, 半角数値7桁

Returns:

  • (String)


16
17
18
# File 'lib/kamome/models/general.rb', line 16

def zipcode
  @zipcode
end

Instance Method Details

#attributesObject



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/kamome/models/general.rb', line 87

def attributes
  {
    code: code,
    zipcode: zipcode,
    prefecture_kana: prefecture_kana,
    city_kana: city_kana,
    town_kana: town_kana,
    prefecture: prefecture,
    city: city,
    town: town,
    ambiguous_town: ambiguous_town,
    ambiguous_street: ambiguous_street,
    required_chome: required_chome,
    ambiguous_zipcode: ambiguous_zipcode,
    state: state,
    reason: reason
  }
end