Class: Twb::RowsColsSplitter
- Inherits:
-
Object
- Object
- Twb::RowsColsSplitter
- Includes:
- Comparable
- Defined in:
- lib/twb/worksheet.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Instance Method Summary collapse
-
#initialize(node) ⇒ RowsColsSplitter
constructor
A new instance of RowsColsSplitter.
Constructor Details
#initialize(node) ⇒ RowsColsSplitter
Returns a new instance of RowsColsSplitter.
156 157 158 159 160 161 162 163 |
# File 'lib/twb/worksheet.rb', line 156 def initialize node @fields = [] return fields if node.nil? unless node.text.nil? codes = node.text.split(/[\])] [\/+*] [(]?\[/) codes.each {|c| @fields << c.gsub(/^[(]*[\[]*|[)\]]*$/,'')} end end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
155 156 157 |
# File 'lib/twb/worksheet.rb', line 155 def fields @fields end |