Class: Locomotive::Steam::Liquid::Tags::Editable::File

Inherits:
Base
  • Object
show all
Defined in:
lib/locomotive/steam/liquid/tags/editable/file.rb

Constant Summary

Constants inherited from Base

Base::Syntax

Instance Attribute Summary

Attributes inherited from Base

#label, #page_fullpath, #slug

Attributes included from Concerns::Attributes

#attributes, #raw_attributes

Instance Method Summary collapse

Methods inherited from Base

#blank?, #default_render, #initialize

Constructor Details

This class inherits a constructor from Locomotive::Steam::Liquid::Tags::Editable::Base

Instance Method Details

#parse(tokens) ⇒ Object



8
9
10
11
12
# File 'lib/locomotive/steam/liquid/tags/editable/file.rb', line 8

def parse(tokens)
  super.tap do
    @path = [current_inherited_block_name, slug].compact.join('--').gsub('/', '--')
  end
end

#render(context) ⇒ Object



14
15
16
# File 'lib/locomotive/steam/liquid/tags/editable/file.rb', line 14

def render(context)
  apply_transformation(super, context)
end