Class: Waves::Renderers::Markaby

Inherits:
Object
  • Object
show all
Includes:
Mixin
Defined in:
lib/renderers/markaby.rb

Class Method Summary collapse

Methods included from Mixin

included

Class Method Details

.render(path, assigns) ⇒ Object

capture needed here for content fragments, otherwise you’ll just get the last tag’s output … def self.capture( template )

"capture { #{template} }"

end



21
22
23
24
25
26
27
# File 'lib/renderers/markaby.rb', line 21

def self.render( path, assigns )
  builder = ::Markaby::Builder.new( assigns )
  helper = helper( path )
  builder.meta_eval { include( helper ) }
  builder.instance_eval( template( path ) )
  builder.to_s
end