Sha256: 4837a6a4ebc36ee9ad661db343daa7ece0088c4341ce47ed88f10205b4e726db

Contents?: true

Size: 318 Bytes

Versions: 8

Compression:

Stored size: 318 Bytes

Contents

# frozen_string_literal: true
module Temple
  module Filters
    # Validates temple expression with given grammar
    #
    # @api public
    class Validator < Filter
      define_options grammar: Temple::Grammar

      def compile(exp)
        options[:grammar].validate!(exp)
        exp
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
brakeman-7.0.0 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/validator.rb
brakeman-6.2.2 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/validator.rb
brakeman-6.2.2.rc1 bundle/ruby/3.3.0/gems/temple-0.10.3/lib/temple/filters/validator.rb
brakeman-6.2.1 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/validator.rb
brakeman-6.2.0 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/filters/validator.rb
temple-0.10.3 lib/temple/filters/validator.rb
temple-0.10.2 lib/temple/filters/validator.rb
temple-0.10.1 lib/temple/filters/validator.rb