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.
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
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks.
174 175 176 |
# File 'lib/pancake/mixins/render/render.rb', line 174 def blocks @blocks end |
#current_label ⇒ Object
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_from ⇒ Object
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_index ⇒ Object (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 |