Class: Pancake::Mixins::Render::ViewContext::ContentInheritance::Helper
- Defined in:
- lib/pancake/mixins/render/render.rb
Instance Attribute Summary collapse
-
#blocks ⇒ Object
readonly
Returns the value of attribute blocks.
-
#current_label ⇒ Object
Returns the value of attribute current_label.
-
#inherits_from ⇒ Object
Returns the value of attribute inherits_from.
-
#super_index ⇒ Object
readonly
Returns the value of attribute super_index.
Instance Method Summary collapse
- #block_for(label) ⇒ Object
- #decrement_super! ⇒ Object
- #increment_super! ⇒ Object
-
#initialize ⇒ Helper
constructor
A new instance of Helper.
Constructor Details
#initialize ⇒ Helper
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
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks.
151 152 153 |
# File 'lib/pancake/mixins/render/render.rb', line 151 def blocks @blocks end |
#current_label ⇒ Object
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_from ⇒ Object
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_index ⇒ Object (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 |