Class: Waves::Renderers::Haml::Scope
- Inherits:
-
Object
- Object
- Waves::Renderers::Haml::Scope
show all
- Includes:
- Helpers::DocType, Helpers::Layouts, Helpers::Model, Helpers::View
- Defined in:
- lib/waves/layers/renderers/haml.rb
Overview
def self.render( path, assigns )
engine = ::Haml::Engine.new( template( path ) )
scope = Scope.new
helper = helper( path )
scope.meta_eval { include( helper ) }
scope.instance_eval do
assigns.each { |key,val| instance_variable_set("@#key",val) unless key == :request }
end
engine.render(scope, assigns)
end
Constant Summary
Helpers::DocType::DOCTYPES
Instance Method Summary
collapse
#doctype
Instance Method Details
50
51
52
|
# File 'lib/waves/layers/renderers/haml.rb', line 50
def <<(s)
eval("@haml_buffer", @binding).push_text s end
|
#capture(&block) ⇒ Object
54
55
56
|
# File 'lib/waves/layers/renderers/haml.rb', line 54
def capture(&block)
capture_haml(nil, &block)
end
|