class Applocale::Config::SheetInfoByRow

Attributes

key_col[RW]
lang_cols[RW]
row[RW]
use_export[RW]

Public Class Methods

new(row, key_col, lang_cols, use_export) click to toggle source
# File lib/applocale/Core/setting.rb, line 116
def initialize(row, key_col, lang_cols, use_export)
  self.row = row
  self.key_col = key_col
  self.lang_cols = lang_cols
  self.use_export = use_export
end

Public Instance Methods

to_keyStrWithColNo(sheetcontent) click to toggle source
# File lib/applocale/Core/ParseXLSX/parse_xlsx_module.rb, line 24
def to_keyStrWithColNo(sheetcontent)
  sheetcontent.header_rowno = self.row
  keycolno = Applocale::ParseXLSXModule::Helper.collabel_to_colno(self.key_col)
  sheetcontent.keyStr_with_colno = Applocale::ParseModelModule::KeyStrWithColNo.new(nil, keycolno)
  sheetcontent.lang_with_colno_list = Array.new
  self.lang_cols.each do |lang, collabel|
    colno = Applocale::ParseXLSXModule::Helper.collabel_to_colno(collabel)
    obj = Applocale::ParseModelModule::LangWithColNo.new(nil,lang, colno)
    sheetcontent.lang_with_colno_list.push(obj)
  end
end
to_s() click to toggle source
# File lib/applocale/Core/setting.rb, line 123
def to_s
  return "row: #{self.row} | key_col: #{self.key_col} | lang_cols: #{self.lang_cols.to_s} | use_export: #{self.use_export}"
end