Class: Applocale::ParseModelModule::SheetContent
- Inherits:
-
Object
- Object
- Applocale::ParseModelModule::SheetContent
- Defined in:
- lib/applocale/Core/ParseModel/parse_model_module.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#header_rowno ⇒ Object
Returns the value of attribute header_rowno.
-
#keyStr_with_colno ⇒ Object
Returns the value of attribute keyStr_with_colno.
-
#lang_with_colno_list ⇒ Object
Returns the value of attribute lang_with_colno_list.
-
#rowinfo_list ⇒ Object
Returns the value of attribute rowinfo_list.
-
#sheetname ⇒ Object
Returns the value of attribute sheetname.
Instance Method Summary collapse
- #get_rowInfo_sortby_key ⇒ Object
- #get_rowInfo_sortby_rowno ⇒ Object
-
#initialize(sheetname) ⇒ SheetContent
constructor
A new instance of SheetContent.
- #to_s ⇒ Object
Constructor Details
#initialize(sheetname) ⇒ SheetContent
Returns a new instance of SheetContent.
5 6 7 8 9 10 |
# 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 |
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
4 5 6 |
# File 'lib/applocale/Core/ParseModel/parse_model_module.rb', line 4 def comment @comment end |
#header_rowno ⇒ Object
Returns the value of attribute header_rowno.
4 5 6 |
# File 'lib/applocale/Core/ParseModel/parse_model_module.rb', line 4 def header_rowno @header_rowno end |
#keyStr_with_colno ⇒ Object
Returns the value of attribute keyStr_with_colno.
4 5 6 |
# File 'lib/applocale/Core/ParseModel/parse_model_module.rb', line 4 def keyStr_with_colno @keyStr_with_colno end |
#lang_with_colno_list ⇒ Object
Returns the value of attribute lang_with_colno_list.
4 5 6 |
# File 'lib/applocale/Core/ParseModel/parse_model_module.rb', line 4 def lang_with_colno_list @lang_with_colno_list end |
#rowinfo_list ⇒ Object
Returns the value of attribute rowinfo_list.
4 5 6 |
# File 'lib/applocale/Core/ParseModel/parse_model_module.rb', line 4 def rowinfo_list @rowinfo_list end |
#sheetname ⇒ Object
Returns the value of attribute sheetname.
4 5 6 |
# File 'lib/applocale/Core/ParseModel/parse_model_module.rb', line 4 def sheetname @sheetname end |
Instance Method Details
#get_rowInfo_sortby_key ⇒ Object
12 13 14 |
# 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 ⇒ Object
16 17 18 |
# 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 ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# 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 |