Class: ODDB::OdbaExporter::LimTxtTable

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

Constant Summary

FILENAME =
's10x'

Constants inherited from Table

CRLF

Instance Method Summary (collapse)

Methods inherited from Table

#filename

Instance Method Details

- (Object) lines(package)



107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'ext/export/src/oddbdat.rb', line 107

def lines(package)
  lines = []
  unless((sl = package.sl_entry).nil?)
    if(lim = sl.limitation_text)
      lim.descriptions.each { |lang, value|
        value.paragraphs.each_with_index { |par, idx|
          language = lang[0,1].upcase
          lim = (package.oid.to_s + sprintf('%03i', idx).to_s).to_i
          txt = par.text
          lines << LimTxtLine.new(lim, language, txt)
        }
      }
    end
  end
  lines
end