Class: Undies::SourceStack

Inherits:
Array
  • Object
show all
Defined in:
lib/undies/source_stack.rb

Instance Method Summary collapse

Constructor Details

#initialize(source) ⇒ SourceStack

a source stack is used to manage which sources and any deeply nested layouts they are in. initialize this object with a content source obj and get a stack where the the top source is the outer most layout and the bottom source is the source used to initialize the stack (the content source). naturally any sources in between are the intermediate layouts for the content source



13
14
15
# File 'lib/undies/source_stack.rb', line 13

def initialize(source)
  super([source, source.layouts].flatten.compact)
end

Instance Method Details

#popObject



17
18
19
# File 'lib/undies/source_stack.rb', line 17

def pop
  super
end