Class: Applocale::Config::SheetInfoByRow
- Inherits:
-
Object
- Object
- Applocale::Config::SheetInfoByRow
- Defined in:
- lib/applocale/Core/setting.rb,
lib/applocale/Core/ParseXLSX/parse_xlsx_module.rb
Instance Attribute Summary collapse
-
#key_col ⇒ Object
Returns the value of attribute key_col.
-
#lang_cols ⇒ Object
Returns the value of attribute lang_cols.
-
#row ⇒ Object
Returns the value of attribute row.
Instance Method Summary collapse
-
#initialize(row, key_col, lang_cols) ⇒ SheetInfoByRow
constructor
A new instance of SheetInfoByRow.
- #to_keyStrWithColNo(sheetcontent) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(row, key_col, lang_cols) ⇒ SheetInfoByRow
Returns a new instance of SheetInfoByRow.
110 111 112 113 114 |
# File 'lib/applocale/Core/setting.rb', line 110 def initialize(row, key_col, lang_cols) self.row = row self.key_col = key_col self.lang_cols = lang_cols end |
Instance Attribute Details
#key_col ⇒ Object
Returns the value of attribute key_col.
108 109 110 |
# File 'lib/applocale/Core/setting.rb', line 108 def key_col @key_col end |
#lang_cols ⇒ Object
Returns the value of attribute lang_cols.
108 109 110 |
# File 'lib/applocale/Core/setting.rb', line 108 def lang_cols @lang_cols end |
#row ⇒ Object
Returns the value of attribute row.
108 109 110 |
# File 'lib/applocale/Core/setting.rb', line 108 def row @row end |
Instance Method Details
#to_keyStrWithColNo(sheetcontent) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# 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 ⇒ Object
116 117 118 |
# File 'lib/applocale/Core/setting.rb', line 116 def to_s return "row: #{self.row} | key_col: #{self.key_col} | lang_cols: #{self.lang_cols.to_s}" end |