Sha256: 36be3479cbd47e5c2a188e1d45cefe9415bc49e45becd4c0eefa7ff915311adc

Contents?: true

Size: 1.41 KB

Versions: 70

Compression:

Stored size: 1.41 KB

Contents

# The Slim module contains all Slim related classes (e.g. Engine, Parser).
# Plugins might also reside within the Slim module (e.g. Include, Smart).
# @api public
module Slim
  # Slim engine which transforms slim code to executable ruby code
  # @api public
  class Engine < Temple::Engine
    # This overwrites some Temple default options or sets default options for Slim specific filters.
    # It is recommended to set the default settings only once in the code and avoid duplication. Only use
    # `define_options` when you have to override some default settings.
    define_options pretty: false,
                   sort_attrs: true,
                   format: :xhtml,
                   attr_quote: '"',
                   merge_attrs: {'class' => ' '},
                   generator: Temple::Generators::StringBuffer,
                   default_tag: 'div'

    filter :Encoding
    filter :RemoveBOM
    use Slim::Parser
    use Slim::Embedded
    use Slim::Interpolation
    use Slim::Splat::Filter
    use Slim::DoInserter
    use Slim::EndInserter
    use Slim::Controls
    html :AttributeSorter
    html :AttributeMerger
    use Slim::CodeAttributes
    use(:AttributeRemover) { Temple::HTML::AttributeRemover.new(remove_empty_attrs: options[:merge_attrs].keys) }
    html :Pretty
    filter :Escapable
    filter :ControlFlow
    filter :MultiFlattener
    filter :StaticMerger
    use(:Generator) { options[:generator] }
  end
end

Version data entries

70 entries across 56 versions & 5 rubygems

Version Path
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/brakeman-4.7.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/brakeman-4.7.0/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/slim-4.0.1/lib/slim/engine.rb
brakeman-4.7.1 bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/brakeman-4.7.0/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/slim-4.0.1/lib/slim/engine.rb
brakeman-4.7.0 bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.1 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/brakeman-4.6.1/bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb
zuora_connect_ui-0.8.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/bundle/ruby/2.5.0/gems/slim-4.0.1/lib/slim/engine.rb
brakeman-4.6.1 bundle/ruby/2.6.0/gems/slim-4.0.1/lib/slim/engine.rb