Class: Kirico::ChangingAddressRecord

Inherits:
ApplicationRecord show all
Defined in:
lib/kirico/models/changing_address_record.rb

Constant Summary collapse

DOC_CODE =
'22187041'

Instance Method Summary collapse

Methods included from Helper

#define_code_mapper_method, #define_format_date_method

Constructor Details

#initialize {|_self| ... } ⇒ ChangingAddressRecord

Returns a new instance of ChangingAddressRecord.

Yields:

  • (_self)

Yield Parameters:



42
43
44
# File 'lib/kirico/models/changing_address_record.rb', line 42

def initialize
  yield(self) if block_given?
end

Instance Method Details

#to_csvObject



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/kirico/models/changing_address_record.rb', line 46

def to_csv
  [
    DOC_CODE,
    area_code,
    office_code,
    ip_code,
    basic_pension_number1,
    basic_pension_number2,
    mapped_birth_at_era_nengo,
    fmt_era_ymd_birth_at,
    zip_code1,
    zip_code2,
    new_address_yomi,
    new_address,
    mapped_updated_at_era_nengo,
    fmt_era_ymd_updated_at,
    ip_name_yomi,
    ip_name,
    old_address_yomi,
    old_address,
    memo
  ].map { |attr| attr.to_s.encode('CP932') }.join(',')
end