Rails needs to support the creation of view DSLs. This could be called by the plugin on initialization or by the app in the environment.rb.
ActionView::Dsl.load Gridzilla::Base ActionView::Dsl.unload Gridzilla::BaseInstance level sub-DSLs that would be used in the higher level DSL.
self.load_dsl Gridzilla::Rows self.load_dsl Gridzill::RowsOptions:
:namespace => “blah” :rename => {:method => :new_method}or
ActionView::Dsl.load Gridzilla::Base do namespace “blah” rename :method, :new_method endThere needs to be a clean way of dealing with state within the DSL. This may or may not be an issue depending on the implementation of the DSL. If it is mixed into the view then it is important to keep DSLs from stepping on view instance variables and such.
There are top level methods that should be included into ActionView::Base. In the context of Gridzilla that would be the Gridzilla::Base#grid. If a plugin is all top level methods then it is just a helper and not a DSL.
helper_methods → DSL Language → DSL Sub Language