Class: Osheet::Worksheet
- Inherits:
-
Object
- Object
- Osheet::Worksheet
- Includes:
- Associations, Instance, MarkupElement, MetaElement, WorkbookElement
- Defined in:
- lib/osheet/worksheet.rb
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(workbook = nil, *args, &block) ⇒ Worksheet
constructor
A new instance of Worksheet.
- #name(value = nil) ⇒ Object
Methods included from MarkupElement
Methods included from MetaElement
Methods included from WorkbookElement
Methods included from Associations
Constructor Details
#initialize(workbook = nil, *args, &block) ⇒ Worksheet
Returns a new instance of Worksheet.
15 16 17 18 19 20 21 22 |
# File 'lib/osheet/worksheet.rb', line 15 def initialize(workbook=nil, *args, &block) set_ivar(:workbook, workbook) set_ivar(:name, nil) if block_given? set_binding_ivars(block.binding) instance_exec(*args, &block) end end |
Instance Method Details
#attributes ⇒ Object
28 29 30 |
# File 'lib/osheet/worksheet.rb', line 28 def attributes { :name => get_ivar(:name) } end |
#name(value = nil) ⇒ Object
24 25 26 |
# File 'lib/osheet/worksheet.rb', line 24 def name(value=nil) !value.nil? ? set_ivar(:name, sanitized_name(value)) : get_ivar(:name) end |