Class: WPRoot::Haml
- Inherits:
-
Object
- Object
- WPRoot::Haml
- Defined in:
- lib/wproot/haml.rb
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(content) ⇒ Haml
constructor
A new instance of Haml.
Constructor Details
#initialize(content) ⇒ Haml
Returns a new instance of Haml.
3 4 5 |
# File 'lib/wproot/haml.rb', line 3 def initialize(content) @content = content end |
Instance Method Details
#compile ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/wproot/haml.rb', line 7 def compile IO.popen(['php', File.('../../../vendor/HamlPHP.php', __FILE__)], 'w+') do |io| io.write(@content) io.close_write io.read end end |