Class: SpreadsheetML::Worksheet

Inherits:
Object
  • Object
show all
Defined in:
lib/spreadsheetml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xml) ⇒ Worksheet

Returns a new instance of Worksheet.



19
20
21
22
# File 'lib/spreadsheetml.rb', line 19

def initialize(xml)
  @name = xml.attributes["ss:Name"]
  @tables = xml.elements.collect("Table") { |table| Table.new(table) }
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/spreadsheetml.rb', line 17

def name
  @name
end

#tablesObject

Returns the value of attribute tables.



17
18
19
# File 'lib/spreadsheetml.rb', line 17

def tables
  @tables
end