Sha256: 55a94b8de6f93f067ca98524a3af9850897dd384709b9ddfb82cf05046441360

Contents?: true

Size: 632 Bytes

Versions: 25

Compression:

Stored size: 632 Bytes

Contents

module Padrino
  module Helpers
    module OutputHelpers
      ##
      # Handler for Haml templates.
      #
      class HamlHandler < AbstractHandler
        ##
        # Returns true if the block is for Haml
        #
        def engine_matches?(block)
          template.block_is_haml?(block)
        end

        ##
        # Captures the html from a block of template code for this handler.
        #
        def capture_from_template(*args, &block)
          engine_matches?(block) ? template.capture_haml(*args, &block) : yield(*args)
        end
      end
      OutputHelpers.register(:haml, HamlHandler)
    end
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/padrino-helpers-0.13.3.4/lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.12.9 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.3.4 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.14.0.2 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.14.0.1 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.14.0 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.14.0.rc2 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.14.0.rc1 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.3.3 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.3.2 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.12.8.1 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.3.1 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.3 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.12.8 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.12.7 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.12.6 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.2 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.1 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.1.beta1 lib/padrino-helpers/output_helpers/haml_handler.rb
padrino-helpers-0.13.0 lib/padrino-helpers/output_helpers/haml_handler.rb