Class: RubyXL::Chartsheet

Inherits:
OOXMLTopLevelObject show all
Includes:
RelationshipSupport
Defined in:
lib/rubyXL/objects/chartsheet.rb

Overview

Constant Summary collapse

CONTENT_TYPE =
'application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml'
REL_TYPE =
'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet'

Instance Attribute Summary collapse

Attributes included from RelationshipSupport

#generic_storage, #relationship_container

Instance Method Summary collapse

Methods included from RelationshipSupport

#collect_related_objects, #load_relationships, #related_objects, #store_relationship

Methods inherited from OOXMLTopLevelObject

#add_to_zip, #file_index, parse_file, save_order, set_namespaces

Methods included from OOXMLObjectClassMethods

#define_attribute, #define_child_node, #define_element_name, #obtain_class_variable, #parse, #set_countable

Methods included from OOXMLObjectInstanceMethods

#before_write_xml, #dup, #index_in_collection, #initialize, #write_xml

Instance Attribute Details

#relsObject

Returns the value of attribute rels.



65
66
67
# File 'lib/rubyXL/objects/chartsheet.rb', line 65

def rels
  @rels
end

#sheet_idObject

Returns the value of attribute sheet_id.



66
67
68
# File 'lib/rubyXL/objects/chartsheet.rb', line 66

def sheet_id
  @sheet_id
end

#sheet_nameObject

Returns the value of attribute sheet_name.



66
67
68
# File 'lib/rubyXL/objects/chartsheet.rb', line 66

def sheet_name
  @sheet_name
end

#stateObject

Returns the value of attribute state.



65
66
67
# File 'lib/rubyXL/objects/chartsheet.rb', line 65

def state
  @state
end

#workbookObject

Returns the value of attribute workbook.



66
67
68
# File 'lib/rubyXL/objects/chartsheet.rb', line 66

def workbook
  @workbook
end

Instance Method Details

#attach_relationship(rid, rf) ⇒ Object



93
94
95
96
97
98
# File 'lib/rubyXL/objects/chartsheet.rb', line 93

def attach_relationship(rid, rf)
  case rf
  when RubyXL::DrawingFile then store_relationship(rf) # TODO
  else store_relationship(rf, :unknown)
  end
end

#relationship_file_classObject



89
90
91
# File 'lib/rubyXL/objects/chartsheet.rb', line 89

def relationship_file_class
  RubyXL::SheetRelationshipsFile
end

#xlsx_pathObject



85
86
87
# File 'lib/rubyXL/objects/chartsheet.rb', line 85

def xlsx_path
  File.join('xl', 'chartsheets', "sheet#{file_index}.xml")
end