Class: ODDB::OdbaExporter::LimitationTable

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

Constant Summary collapse

FILENAME =
's16x'

Constants inherited from Table

Table::CRLF

Instance Method Summary collapse

Methods inherited from Table

#filename

Instance Method Details

#lines(package) ⇒ Object



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'ext/export/src/oddbdat.rb', line 89

def lines(package)
  lines = []
  unless((sl = package.sl_entry).nil?)
    if(lim = sl.limitation_text)
      chap = lim.descriptions.values.first
      chap.paragraphs.each_with_index { |par, idx|
        pack = package.oid
        line = idx 
        lim = (pack.to_s + sprintf('%03i', line).to_s).to_i
        lines << LimitationLine.new(lim)
      }
    end
  end
  lines
end