Class: Twb::RowsColsSplitter

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/twb/worksheet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fieldsObject (readonly)

Returns the value of attribute fields.



277
278
279
# File 'lib/twb/worksheet.rb', line 277

def fields
  @fields
end