Class: ReadXls::RecordHandler::LabelSst

Inherits:
Base
  • Object
show all
Defined in:
lib/read_xls/record_handler/label_sst.rb

Constant Summary collapse

SST_INDEX_OFFSET =
6
SST_INDEX_SIZE =
4

Instance Attribute Summary

Attributes inherited from Base

#biff, #builder, #record_data, #record_number

Instance Method Summary collapse

Methods inherited from Base

call, #initialize

Constructor Details

This class inherits a constructor from ReadXls::RecordHandler::Base

Instance Method Details

#callObject



7
8
9
10
11
12
# File 'lib/read_xls/record_handler/label_sst.rb', line 7

def call
  row, column = record_data.byteslice(0, 4).unpack("v2")
  sst_index   = record_data.byteslice(SST_INDEX_OFFSET, SST_INDEX_SIZE).unpack("V").first

  builder.add_column_to_row(row, column, ::ReadXls::Evaluator::SstString.new(sst_index, builder))
end