class Locomotive::Steam::Liquid::Tags::Hybrid
Public Instance Methods
find_block_delimiter?(tokenizer)
click to toggle source
# File lib/locomotive/steam/liquid/tags/hybrid.rb, line 21 def find_block_delimiter?(tokenizer) tokenizer.instance_variable_get(:@tokens).each do |token| next if token.empty? if token.start_with?(::Liquid::BlockBody::TAGSTART) if token =~ ::Liquid::BlockBody::FullToken return false if Regexp.last_match(1) == @tag_name return true if Regexp.last_match(1) == block_delimiter end end end false end
nodelist()
click to toggle source
# File lib/locomotive/steam/liquid/tags/hybrid.rb, line 34 def nodelist @body&.nodelist || [] end
parse(tokens)
click to toggle source
Calls superclass method
# File lib/locomotive/steam/liquid/tags/hybrid.rb, line 12 def parse(tokens) if @render_as_block = find_block_delimiter?(tokens) super else @body = nil @blank = false end end
render_as_block?()
click to toggle source
# File lib/locomotive/steam/liquid/tags/hybrid.rb, line 8 def render_as_block? @render_as_block end