Class: ODDB::OdbaExporter::CompLine

Inherits:
Line show all
Defined in:
ext/export/src/oddbdat.rb

Constant Summary

LENGTH =
19

Instance Method Summary (collapse)

Methods inherited from Line

#content, #empty?, #to_s

Constructor Details

- (CompLine) initialize(company)

A new instance of CompLine



547
548
549
550
# File 'ext/export/src/oddbdat.rb', line 547

def initialize(company)
  @company = company
  super
end

Instance Method Details

- (Object) structure



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'ext/export/src/oddbdat.rb', line 551

def structure
  addr = @company.address(0)
  {
    1    =>  '12',
    2    =>  @date,
    3    =>  @company.oid,
    4    =>  '4',
    5    =>  @company.ean13,
    7    =>  @company.name,
    8    =>  addr.address,
    9    =>  'CH',
    10 =>  addr.plz,
    11 =>  addr.city,
    13 =>  addr.fon.first,
    15 =>  addr.fax.first,
    16 =>  @company.address_email,
    17 =>  @company.url,
  }
end