class Osheet::Workbook::ElementStack
This ‘Workbook’ class is really just a scope for workbook builds to run in. All actually workbook metadata is behavior is handled by the ‘WorkbookElement’ class
Public Class Methods
new()
click to toggle source
this class is just a wrapper to Array. I want to treat this as a stack of objects for the workbook DSL to reference. I need to push an object onto the stack, reference it using the ‘current’ method, and pop it off the stack when I’m done.
Calls superclass method
# File lib/osheet/workbook.rb, line 105 def initialize super end
Public Instance Methods
current()
click to toggle source
# File lib/osheet/workbook.rb, line 117 def current self.last end
pop(*args)
click to toggle source
Calls superclass method
# File lib/osheet/workbook.rb, line 113 def pop(*args) super end
push(*args)
click to toggle source
Calls superclass method
# File lib/osheet/workbook.rb, line 109 def push(*args) super end
size(*args)
click to toggle source
Calls superclass method
# File lib/osheet/workbook.rb, line 121 def size(*args) super end
using(obj, &block)
click to toggle source
# File lib/osheet/workbook.rb, line 125 def using(obj, &block) push(obj) block.call if !block.nil? pop end