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:



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

def initialize
  yield(self) if block_given?
end

Instance Method Details

#to_csvObject



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

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