Class: Liquid::InheritedBlockDrop

Inherits:
Drop
  • Object
show all
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

Drop::EMPTY_STRING

Instance Attribute Summary

Attributes inherited from Drop

#context

Instance Method Summary collapse

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

#nameObject



14
15
16
# File 'lib/liquid/drops/inherited_block_drop.rb', line 14

def name
  @block.name
end

#superObject



18
19
20
# File 'lib/liquid/drops/inherited_block_drop.rb', line 18

def super
  @block.call_super(@context)
end