Class: Padrino::Helpers::OutputHelpers::HamlHandler

### Home Classes Methods

### In Files

- lib/padrino-helpers/output_helpers/haml_handler.rb

### Parent

Padrino::Helpers::OutputHelpers::AbstractHandler

### Methods

- #capture_from_template
- #engine_matches?

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Padrino
- Padrino::Helpers
- Padrino::Helpers::AssetTagHelpers
- Padrino::Helpers::FormBuilder
- Padrino::Helpers::FormBuilder::AbstractFormBuilder
- Padrino::Helpers::FormBuilder::DeprecatedBuilderMethods
- Padrino::Helpers::FormBuilder::StandardFormBuilder
- Padrino::Helpers::FormHelpers
- Padrino::Helpers::FormHelpers::Errors
- Padrino::Helpers::FormHelpers::Options
- Padrino::Helpers::FormHelpers::Security
- Padrino::Helpers::NumberHelpers
- Padrino::Helpers::OutputHelpers
- Padrino::Helpers::OutputHelpers::AbstractHandler
- Padrino::Helpers::OutputHelpers::ErbHandler
- Padrino::Helpers::OutputHelpers::HamlHandler
- Padrino::Helpers::OutputHelpers::SinatraCurrentEngine
- Padrino::Helpers::OutputHelpers::SlimHandler
- Padrino::Helpers::RenderHelpers
- Padrino::Helpers::TagHelpers
- Padrino::Helpers::TranslationHelpers
- Padrino::Rendering
- Padrino::Rendering::ClassMethods
- Padrino::Rendering::ErubisTemplate
- Padrino::Rendering::HamlTemplate
- Padrino::Rendering::InstanceMethods
- Padrino::Rendering::SafeBufferEnhancer
- Padrino::Rendering::SafeEruby
- Padrino::Rendering::SafeTemplate
- Padrino::Rendering::SlimTemplate
- Padrino::Rendering::TemplateNotFound
- Haml
- Haml::Helpers
- Haml::Util

No matching classes.

# Padrino::Helpers::OutputHelpers::HamlHandler

Handler for Haml templates.

### Public Instance Methods

capture_from_template(*args, &block) click to toggle source

Captures the html from a block of template code for this handler.

    # File lib/padrino-helpers/output_helpers/haml_handler.rb, line 18
    def capture_from_template(*args, &block)
      engine_matches?(block) ? template.capture_haml(*args, &block) : yield(*args)
    end

engine_matches?(block) click to toggle source

Returns true if the block is for Haml

    # File lib/padrino-helpers/output_helpers/haml_handler.rb, line 11
    def engine_matches?(block)
      template.block_is_haml?(block)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.