Class: Locomotive::Steam::Liquid::Drops::InheritedBlock

Inherits:
Liquid::Drop
  • Object
show all
Defined in:
lib/locomotive/steam/liquid/drops/inherited_block.rb

Overview

Used to render the content of the parent block.

{% extends home %}
{% block content }{{ block.super }}{% endblock %}

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ InheritedBlock

Returns a new instance of InheritedBlock.



12
13
14
# File 'lib/locomotive/steam/liquid/drops/inherited_block.rb', line 12

def initialize(block)
  @block = block
end

Instance Method Details

#nameObject



16
17
18
# File 'lib/locomotive/steam/liquid/drops/inherited_block.rb', line 16

def name
  @block.name
end

#superObject



20
21
22
# File 'lib/locomotive/steam/liquid/drops/inherited_block.rb', line 20

def super
  @block.call_super(@context)
end