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.
278 279 280 281 282 283 284 285 286 287 |
# File 'lib/twb/worksheet.rb', line 278 def initialize node @fields = [] return fields if node.nil? unless node.text.nil? codes = node.text.split(/[\])] [\/+*] [(]?\[/) codes.each do |c| @fields << c.gsub(/^[(]*[\[]*|[)\]]*$/,'') end end end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
277 278 279 |
# File 'lib/twb/worksheet.rb', line 277 def fields @fields end |