Class: OOXL::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/ooxl/xl_objects/table.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream) ⇒ Table

Returns a new instance of Table.



3
4
5
# File 'lib/ooxl/xl_objects/table.rb', line 3

def initialize(stream)
  @table_node = Nokogiri.XML(stream).remove_namespaces!
end

Instance Method Details

#nameObject



11
12
13
# File 'lib/ooxl/xl_objects/table.rb', line 11

def name
  @table_node.at('/table').attributes['name'].try(:value)
end

#refObject



7
8
9
# File 'lib/ooxl/xl_objects/table.rb', line 7

def ref
  @table_node.at('/table').attributes['ref'].try(:value)
end