I ended up moving to a stateless implementation, but I did figure out a way 
to maintain state first.

Basically, you can use class variables inside Haml::Helpers:

module Haml
  module Helpers

    @@state_variable = 0
 
    def container(attrs = {}, &block)
      # Use @@state_variable however you want...
    end

  end
end

and container() is available for use inside Haml files.

Eric

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haml+unsubscr...@googlegroups.com.
To post to this group, send email to haml@googlegroups.com.
Visit this group at http://groups.google.com/group/haml.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to