Module: Haml

Extends:
Haml::Version
Defined in:
/var/www/sass-pages/.haml/lib/haml.rb,
/var/www/sass-pages/.haml/lib/haml/util.rb,
/var/www/sass-pages/.haml/lib/haml/exec.rb,
/var/www/sass-pages/.haml/lib/haml/root.rb,
/var/www/sass-pages/.haml/lib/haml/html.rb,
/var/www/sass-pages/.haml/lib/haml/html.rb,
/var/www/sass-pages/.haml/lib/haml/error.rb,
/var/www/sass-pages/.haml/lib/haml/buffer.rb,
/var/www/sass-pages/.haml/lib/haml/engine.rb,
/var/www/sass-pages/.haml/lib/haml/shared.rb,
/var/www/sass-pages/.haml/lib/haml/version.rb,
/var/www/sass-pages/.haml/lib/haml/filters.rb,
/var/www/sass-pages/.haml/lib/haml/filters.rb,
/var/www/sass-pages/.haml/lib/haml/helpers.rb,
/var/www/sass-pages/.haml/lib/haml/template.rb,
/var/www/sass-pages/.haml/lib/haml/html/erb.rb,
/var/www/sass-pages/.haml/lib/haml/precompiler.rb,
/var/www/sass-pages/.haml/lib/haml/util/subset_map.rb,
/var/www/sass-pages/.haml/lib/haml/template/options.rb,
/var/www/sass-pages/.haml/lib/haml/helpers/action_view_extensions.rb

Overview

We keep options in its own self-contained file so that we can load it independently in Rails 3, where the full template stuff is lazy-loaded.

Defined Under Namespace

Modules: Exec, Filters, Helpers, Precompiler, Shared, Template, Util, Version Classes: Buffer, Engine, Error, HTML, SyntaxError

Constant Summary

VERSION = A string representing the version of Haml.
version[:string] unless defined?(Haml::VERSION)
ROOT_DIR = The root directory of the Haml source tree.
File.expand_path(File.join(__FILE__, "../../.."))

Class Method Summary

Class Method Details

+ 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.

Parameters:

  • (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


34
35
36
37
# File '/var/www/sass-pages/.haml/lib/haml.rb', line 34

def self.init_rails(binding)
  # No &method here for Rails 2.1 compatibility
  %w[haml/template sass sass/plugin].each {|f| require f}
end