Class: Kirico::Company

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/kirico/models/company.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Company.

Yields:

  • (_self)

Yield Parameters:



31
32
33
# File 'lib/kirico/models/company.rb', line 31

def initialize
  yield(self) if block_given?
end

Instance Method Details

#to_csvObject



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/kirico/models/company.rb', line 35

def to_csv
  [
    area_code,
    office_code,
    office_number,
    zip_code1,
    zip_code2,
    address,
    name,
    owner_name,
    tel_number
  ].map { |attr| attr.to_s.encode('CP932') }.join(',')
end