I'm new to Ruby and Haml (and Sinatra).  I have a sinatra handler that
uses haml per the sinatra readme example. I'm able to access instance
variables in my main haml template. So the mypage.haml template sees
@some_var.

get '/' do
    @some_var
    haml :mypage
end

I have a class that will generate an array of objects that I want to
render with haml and include into the main page.

The fragment might look like this, with 2 variables to substitute.
%h2= @header_value
%p @paragraph_value

I'm thinking that the instance of the generator class can call
Haml::Engine render and somehow access the 2 ruby variables in the
template.

Help please.  I'm not sure how to tackle this.

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to