Sha256: 5389843a526fca78b5d962851f5fd82f26fb7bf6fa6faab8dd402f54b9ee1183

Contents?: true

Size: 436 Bytes

Versions: 117

Compression:

Stored size: 436 Bytes

Contents

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

117 entries across 103 versions & 7 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/temple-0.8.2/lib/temple/html/filter.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/temple-0.8.2/lib/temple/html/filter.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-6.1.2 bundle/ruby/3.3.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-6.1.1 bundle/ruby/3.0.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-6.1.0 bundle/ruby/3.1.0/gems/temple-0.8.2/lib/temple/html/filter.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-6.0.1 bundle/ruby/3.1.0/gems/temple-0.8.2/lib/temple/html/filter.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-6.0.0 bundle/ruby/3.0.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-5.4.1 bundle/ruby/3.1.0/gems/temple-0.8.2/lib/temple/html/filter.rb
temple-0.10.0 lib/temple/html/filter.rb
brakeman-5.4.0 bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb
temple-0.9.1 lib/temple/html/filter.rb
temple-0.9.0 lib/temple/html/filter.rb
brakeman-5.3.1 bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-5.3.0 bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-5.2.3 bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-5.2.2 bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb
brakeman-5.2.1 bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb