public
Rubygem
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/nex3/haml.git
Search Repo:
Make init.rb more flexible.

git-svn-id: svn://hamptoncatlin.com/haml/trunk@690 
7063305b-7217-0410-af8c-cdc13e5119b9
nex3 (author)
Tue Dec 11 02:03:44 -0800 2007
commit  9a848a7eff92c6f98eb50b5a45a766e560199d76
tree    09a26fd0fcb90886c66861ff54bc87cee037ec50
parent  a4c5b79dfb5b6ccdf639b3df925e519dafbb8945
...
1
2
3
4
5
6
 
...
1
 
 
 
 
 
2
0
@@ -1,6 +1,2 @@
0
 require 'haml'
0
-require 'haml/template'
0
-require 'sass'
0
-require 'sass/plugin'
0
-
0
-# All the necessary modifications are made via the cougar's kiss
0
+Haml.init_rails(binding)
...
713
714
715
716
 
 
 
 
 
 
 
 
 
 
717
718
...
713
714
715
 
716
717
718
719
720
721
722
723
724
725
726
727
0
@@ -713,6 +713,15 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir)
0
 # if they have no content.
0
 # Defaults to <tt>['meta', 'img', 'link', 'script', 'br', 'hr']</tt>.
0
 #
0
-module Haml; end
0
+module Haml
0
+ # This method is called by init.rb,
0
+ # which is run by Rails on startup.
0
+ # We use it rather than putting stuff straight into init.rb
0
+ # so we can change the initialization behavior
0
+ # without modifying the file itself.
0
+ def self.init_rails(binding)
0
+ %w[haml/template sass sass/plugin].each(&:require)
0
+ end
0
+end
0
 
0
 require 'haml/engine'

Comments

    No one has commented yet.