Class: RubyXL::Chartsheet
- Inherits:
-
OOXMLTopLevelObject
- Object
- OOXMLObject
- OOXMLTopLevelObject
- RubyXL::Chartsheet
- Defined in:
- lib/rubyXL/objects/chartsheet.rb
Overview
Instance Attribute Summary collapse
-
#sheet_id ⇒ Object
Returns the value of attribute sheet_id.
-
#sheet_name ⇒ Object
Returns the value of attribute sheet_name.
-
#workbook ⇒ Object
Returns the value of attribute workbook.
Instance Method Summary collapse
Methods inherited from OOXMLTopLevelObject
#add_to_zip, filepath, parse_file, 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
#sheet_id ⇒ Object
Returns the value of attribute sheet_id.
89 90 91 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 89 def sheet_id @sheet_id end |
#sheet_name ⇒ Object
Returns the value of attribute sheet_name.
89 90 91 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 89 def sheet_name @sheet_name end |
#workbook ⇒ Object
Returns the value of attribute workbook.
89 90 91 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 89 def workbook @workbook end |
Instance Method Details
#filepath ⇒ Object
81 82 83 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 81 def filepath File.join('xl', 'chartsheets', "sheet#{sheet_index + 1}.xml") end |
#rel_type ⇒ Object
85 86 87 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 85 def rel_type 'chartsheet' end |
#sheet_index ⇒ Object
77 78 79 |
# File 'lib/rubyXL/objects/chartsheet.rb', line 77 def sheet_index @workbook.worksheets.select{ |sheet| sheet.is_a?(self.class) }.index{ |sheet| sheet.equal?(self) } end |