Sha256: db7b98e1bfa931c5673c8be9cd3d204dea91336fc01b2f79b650f439f16319f5
Contents?: true
Size: 556 Bytes
Versions: 25
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true module PlatformosCheck module Tags class ParseJson < Liquid::Block SYNTAX = /(#{Liquid::VariableSignature}+)/o attr_reader :to def initialize(tag_name, markup, options) super raise Liquid::SyntaxError, "Syntax Error in 'parse_json' - Valid syntax: parse_json [var]" unless markup =~ SYNTAX @to = Regexp.last_match(1) end class ParseTreeVisitor < Liquid::ParseTreeVisitor def children super + [@node.to] end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems