class Applocale::ParseModelModule::SheetContent

Attributes

comment[RW]
header_rowno[RW]
keyStr_with_colno[RW]
lang_with_colno_list[RW]
rowinfo_list[RW]
sheetname[RW]

Public Class Methods

new(sheetname) click to toggle source
# File lib/applocale/Core/ParseModel/parse_model_module.rb, line 5
def initialize(sheetname)
  self.sheetname = sheetname
  self.rowinfo_list = Array.new
  self.lang_with_colno_list = Array.new
  self.comment = sheetname
end

Public Instance Methods

get_rowInfo_sortby_key() click to toggle source
# File lib/applocale/Core/ParseModel/parse_model_module.rb, line 12
def get_rowInfo_sortby_key
  return self.rowinfo_list.sort_by { |obj| obj.key_str.to_s }
end
get_rowInfo_sortby_rowno() click to toggle source
# File lib/applocale/Core/ParseModel/parse_model_module.rb, line 16
def get_rowInfo_sortby_rowno
  return self.rowinfo_list.sort_by { |obj| obj.rowno.to_i }
end
to_s() click to toggle source
# File lib/applocale/Core/ParseModel/parse_model_module.rb, line 20
def to_s
  str_keyStr_with_colno = ''
  unless keyStr_with_colno.nil?
    str_keyStr_with_colno = "\n\t#{keyStr_with_colno.to_s}"
  end
  str_lang_with_colno_list = ''
  self.lang_with_colno_list.each do |langWithColNo|
    str_lang_with_colno_list += "\n\t#{langWithColNo.to_s}"
  end
  str_contentlist = '\n'
  self.get_rowInfo_sortby_rowno.each do |value|
    str_contentlist += "\t #{value.to_s}\n"
  end
  "sheetname = #{sheetname}\n" +
      "header_rowno = #{header_rowno}\n" +
      "keyStrWithColNo = #{str_keyStr_with_colno}\n" +
      "langWithColNo_list = #{str_lang_with_colno_list}\n" +
      "rowinfo_list = #{str_contentlist}"
end