Class: Osheet::WorkbookElement
- Inherits:
-
Object
- Object
- Osheet::WorkbookElement
- Defined in:
- lib/osheet/workbook_element.rb
Defined Under Namespace
Classes: PartialSet, StyleSet, TemplateSet, WorksheetSet
Instance Attribute Summary collapse
-
#partials ⇒ Object
readonly
Returns the value of attribute partials.
-
#styles(*args) ⇒ Object
readonly
Returns the value of attribute styles.
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
-
#title(value = nil) ⇒ Object
readonly
Returns the value of attribute title.
-
#worksheets ⇒ Object
readonly
Returns the value of attribute worksheets.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize ⇒ WorkbookElement
constructor
A new instance of WorkbookElement.
- #partial(partial) ⇒ Object
- #style(style) ⇒ Object
- #template(template) ⇒ Object
- #worksheet(worksheet) ⇒ Object
Constructor Details
#initialize ⇒ WorkbookElement
Returns a new instance of WorkbookElement.
19 20 21 22 23 24 25 26 |
# File 'lib/osheet/workbook_element.rb', line 19 def initialize @title = nil @templates = TemplateSet.new @partials = PartialSet.new @styles = StyleSet.new @worksheets = WorksheetSet.new end |
Instance Attribute Details
#partials ⇒ Object (readonly)
Returns the value of attribute partials.
17 18 19 |
# File 'lib/osheet/workbook_element.rb', line 17 def partials @partials end |
#styles(*args) ⇒ Object (readonly)
Returns the value of attribute styles.
17 18 19 |
# File 'lib/osheet/workbook_element.rb', line 17 def styles @styles end |
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
17 18 19 |
# File 'lib/osheet/workbook_element.rb', line 17 def templates @templates end |
#title(value = nil) ⇒ Object (readonly)
Returns the value of attribute title.
16 17 18 |
# File 'lib/osheet/workbook_element.rb', line 16 def title @title end |
#worksheets ⇒ Object (readonly)
Returns the value of attribute worksheets.
17 18 19 |
# File 'lib/osheet/workbook_element.rb', line 17 def worksheets @worksheets end |
Instance Method Details
#==(other) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/osheet/workbook_element.rb', line 52 def ==(other) title == other.title && templates == other.templates && partials == other.partials && styles == other.styles && worksheets == other.worksheets end |
#partial(partial) ⇒ Object
36 37 38 |
# File 'lib/osheet/workbook_element.rb', line 36 def partial(partial) @partials << partial end |
#style(style) ⇒ Object
40 41 42 |
# File 'lib/osheet/workbook_element.rb', line 40 def style(style) @styles << style end |
#template(template) ⇒ Object
32 33 34 |
# File 'lib/osheet/workbook_element.rb', line 32 def template(template) @templates << template end |
#worksheet(worksheet) ⇒ Object
44 45 46 |
# File 'lib/osheet/workbook_element.rb', line 44 def worksheet(worksheet) @worksheets << worksheet end |