Sha256: b5061992e999d7b97034730e25b233cbca9fbace577d229bea83dabea3eef603

Contents?: true

Size: 466 Bytes

Versions: 10

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true
module Temple
  module HTML
    # @api public
    class Filter < Temple::Filter
      include Dispatcher

      def contains_nonempty_static?(exp)
        case exp.first
        when :multi
          exp[1..-1].any? {|e| contains_nonempty_static?(e) }
        when :escape
          contains_nonempty_static?(exp.last)
        when :static
          !exp.last.empty?
        else
          false
        end
      end
    end
  end
end

Version data entries

10 entries across 9 versions & 3 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/filter.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/temple-0.10.3/lib/temple/html/filter.rb
brakeman-7.0.0 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/filter.rb
brakeman-6.2.2 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/filter.rb
brakeman-6.2.2.rc1 bundle/ruby/3.3.0/gems/temple-0.10.3/lib/temple/html/filter.rb
brakeman-6.2.1 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/filter.rb
brakeman-6.2.0 bundle/ruby/3.1.0/gems/temple-0.10.3/lib/temple/html/filter.rb
temple-0.10.3 lib/temple/html/filter.rb
temple-0.10.2 lib/temple/html/filter.rb
temple-0.10.1 lib/temple/html/filter.rb