Class: Pancake::Mixins::Render::ViewContext::ContentInheritance::Helper

Inherits:
Object
  • Object
show all
Defined in:
lib/pancake/mixins/render/render.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHelper

Returns a new instance of Helper.



153
154
155
156
# File 'lib/pancake/mixins/render/render.rb', line 153

def initialize
  @blocks = Hash.new{|h,k| h[k] = []}
  @super_index = 0
end

Instance Attribute Details

#blocksObject (readonly)

Returns the value of attribute blocks.



151
152
153
# File 'lib/pancake/mixins/render/render.rb', line 151

def blocks
  @blocks
end

#current_labelObject

Returns the value of attribute current_label.



150
151
152
# File 'lib/pancake/mixins/render/render.rb', line 150

def current_label
  @current_label
end

#inherits_fromObject

Returns the value of attribute inherits_from.



150
151
152
# File 'lib/pancake/mixins/render/render.rb', line 150

def inherits_from
  @inherits_from
end

#super_indexObject (readonly)

Returns the value of attribute super_index.



151
152
153
# File 'lib/pancake/mixins/render/render.rb', line 151

def super_index
  @super_index
end

Instance Method Details

#block_for(label) ⇒ Object



158
159
160
# File 'lib/pancake/mixins/render/render.rb', line 158

def block_for(label)
  @blocks[label][@super_index]
end

#decrement_super!Object



166
167
168
# File 'lib/pancake/mixins/render/render.rb', line 166

def decrement_super!
  @super_index -= 1
end

#increment_super!Object



162
163
164
# File 'lib/pancake/mixins/render/render.rb', line 162

def increment_super!
  @super_index += 1
end