Class: Workbook::Worksheets
- Inherits:
-
Array
- Object
- Array
- Workbook::Worksheets
- Defined in:
- lib/writeexcel/worksheets.rb
Instance Attribute Summary collapse
-
#activesheet ⇒ Object
Returns the value of attribute activesheet.
-
#firstsheet ⇒ Object
writeonly
Sets the attribute firstsheet.
Instance Method Summary collapse
- #activesheet_index ⇒ Object
- #firstsheet_index ⇒ Object
-
#initialize ⇒ Worksheets
constructor
A new instance of Worksheets.
- #selected_count ⇒ Object
Constructor Details
#initialize ⇒ Worksheets
Returns a new instance of Worksheets.
7 8 9 10 |
# File 'lib/writeexcel/worksheets.rb', line 7 def initialize @activesheet = nil @firstsheet = nil end |
Instance Attribute Details
#activesheet ⇒ Object
Returns the value of attribute activesheet.
4 5 6 |
# File 'lib/writeexcel/worksheets.rb', line 4 def activesheet @activesheet end |
#firstsheet=(value) ⇒ Object (writeonly)
Sets the attribute firstsheet
5 6 7 |
# File 'lib/writeexcel/worksheets.rb', line 5 def firstsheet=(value) @firstsheet = value end |
Instance Method Details
#activesheet_index ⇒ Object
12 13 14 |
# File 'lib/writeexcel/worksheets.rb', line 12 def activesheet_index index(@activesheet) end |
#firstsheet_index ⇒ Object
16 17 18 |
# File 'lib/writeexcel/worksheets.rb', line 16 def firstsheet_index index(@firstsheet) || 0 end |
#selected_count ⇒ Object
20 21 22 |
# File 'lib/writeexcel/worksheets.rb', line 20 def selected_count self.select { |sheet| sheet.selected? }.size end |