class Osheet::WorkbookElement::WorksheetSet
Public Class Methods
new()
click to toggle source
this class is just a wrapper to Array. I want to push worksheets into the set using the ‘<<’ operator, but only allow Worksheet
objs to be pushed.
Calls superclass method
# File lib/osheet/workbook_element.rb, line 203 def initialize super end
Public Instance Methods
<<(value)
click to toggle source
Calls superclass method
# File lib/osheet/workbook_element.rb, line 207 def <<(value) super if verify(value) end
Private Instance Methods
verify(worksheet)
click to toggle source
verify the worksheet, otherwise ArgumentError it up
# File lib/osheet/workbook_element.rb, line 214 def verify(worksheet) if worksheet.kind_of?(Worksheet) true else raise ArgumentError, 'can only push Osheet::Worksheet to the set' end end