Module | Haml

In:

lib/haml/filters.rb
lib/haml/exec.rb
lib/haml/railtie.rb
lib/haml/error.rb
lib/haml/util/subset_map.rb
lib/haml/html/erb.rb
lib/haml/template.rb
lib/haml/shared.rb
lib/haml/engine.rb
lib/haml/version.rb
lib/haml/template/plugin.rb
lib/haml/template/options.rb
lib/haml/helpers.rb
lib/haml/html.rb
lib/haml/root.rb
lib/haml/precompiler.rb
lib/haml/util.rb
lib/haml/helpers/xss_mods.rb
lib/haml/helpers/action_view_extensions.rb
lib/haml.rb

The module that contains everything Haml-related:

- {Haml::Engine} is the class used to render Haml within Ruby code.
- {Haml::Helpers} contains Ruby helpers available within Haml templates.
- {Haml::Template} interfaces with web frameworks (Rails in particular).
- {Haml::Error} is raised when Haml encounters an error.
- {Haml::HTML} handles conversion of HTML to Haml.

Also see the {file:HAML_REFERENCE.md full Haml reference}.

### Methods

init_rails

### Classes and Modules

Module Haml::Exec
Module Haml::Filters
Module Haml::Helpers
Module Haml::Precompiler
Module Haml::Shared
Module Haml::Template
Module Haml::Util
Module Haml::Version
Class Haml::Buffer
Class Haml::Engine
Class Haml::Error
Class Haml::HTML
Class Haml::Plugin
Class Haml::Railtie
Class Haml::SyntaxError

### Constants

ROOT_DIR | = | File.expand_path("../../..", __FILE__) |  | The root directory of the Haml source tree. This may be overridden by the package manager if the lib directory is separated from the main source tree. @api public
VERSION | = | version[:string] unless defined?(Haml::VERSION) |  | A string representing the version of Haml. A more fine-grained representation is available from Haml.version. @api public

### Public Class methods

init_rails(binding)

Initializes Haml for Rails.

This method is called by `init.rb`, which is run by Rails on startup. We use it rather than putting stuff straight into `init.rb` so we can change the initialization behavior without modifying the file itself.

@param binding [Binding] The context of the `init.rb` file.

      This isn't actually used;
      it's just passed in in case it needs to be used in the future

[Source]

        # File lib/haml.rb, line 34
    34:   def self.init_rails(binding)
    35:     # No &method here for Rails 2.1 compatibility
    36:     %w[haml/template sass sass/plugin].each {|f| require f}
    37:   end

[Validate]