Class: Liquid::InheritedBlockDrop
- Defined in:
- lib/liquid/drops/inherited_block_drop.rb
Overview
Used to render the content of the parent block.
{% extends home %}
{% block content }{{ block.super }}{% endblock %}
Constant Summary
Constants inherited from Drop
Instance Attribute Summary
Attributes inherited from Drop
Instance Method Summary collapse
-
#initialize(block) ⇒ InheritedBlockDrop
constructor
A new instance of InheritedBlockDrop.
- #name ⇒ Object
- #super ⇒ Object
Methods inherited from Drop
#before_method, #has_key?, #inspect, #invoke_drop, #to_liquid, #to_s
Constructor Details
#initialize(block) ⇒ InheritedBlockDrop
Returns a new instance of InheritedBlockDrop.
10 11 12 |
# File 'lib/liquid/drops/inherited_block_drop.rb', line 10 def initialize(block) @block = block end |
Instance Method Details
#name ⇒ Object
14 15 16 |
# File 'lib/liquid/drops/inherited_block_drop.rb', line 14 def name @block.name end |
#super ⇒ Object
18 19 20 |
# File 'lib/liquid/drops/inherited_block_drop.rb', line 18 def super @block.call_super(@context) end |