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.



176
177
178
179
# File 'lib/pancake/mixins/render/render.rb', line 176

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

Instance Attribute Details

#blocksObject (readonly)

Returns the value of attribute blocks.



174
175
176
# File 'lib/pancake/mixins/render/render.rb', line 174

def blocks
  @blocks
end

#current_labelObject

Returns the value of attribute current_label.



173
174
175
# File 'lib/pancake/mixins/render/render.rb', line 173

def current_label
  @current_label
end

#inherits_fromObject

Returns the value of attribute inherits_from.



173
174
175
# File 'lib/pancake/mixins/render/render.rb', line 173

def inherits_from
  @inherits_from
end

#super_indexObject (readonly)

Returns the value of attribute super_index.



174
175
176
# File 'lib/pancake/mixins/render/render.rb', line 174

def super_index
  @super_index
end

Instance Method Details

#block_for(label) ⇒ Object



181
182
183
# File 'lib/pancake/mixins/render/render.rb', line 181

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

#decrement_super!Object



189
190
191
# File 'lib/pancake/mixins/render/render.rb', line 189

def decrement_super!
  @super_index -= 1
end

#increment_super!Object



185
186
187
# File 'lib/pancake/mixins/render/render.rb', line 185

def increment_super!
  @super_index += 1
end