module Tabulous
This holds common behavior for all renderer classes.
A “combined” renderer is one that renders subtab HTML directly inside the HTML list of tabs, rather than two separate HTML lists for tabs and subtabs.
This class is meant to be subclassed. It encapsulates the code common to all combined renderers so that it doesn't have to be recoded everytime.
A “split” renderer is one that produces two different HTML fragments: one for the tabs, another for the subtabs.
“Combined” renderers would embed the subtab HTML straight into the HTML for the tabs, producing just one HTML fragment.
This class is meant to be subclassed. It encapsulates the code common to all split renderers so that it doesn't have to be recoded everytime.
The RenderingCoordinator
gets called from the tabs or subtabs helper in the view and delegates to a renderer object, which produces the appropriate HTML.
The RenderingCoordinator
picks the appropriate rendering class to use based on the renderer named in the Tabulous
setup file.
The RenderingCoordinator
is not responsible for generating any HTML itself, but is responsible for the algorithm of how the HTML gets generated. For example, it adds CSS scaffolding if needed, and behaves according to the value of the when_action_has_no_tab setting in the Tabulous
setup file.
This keeps renderer classes from having to focus on the behavior of rendering as specified in the Tabulous
setup file and instead renderer classes can focus on producing HTML.
Constants
- VERSION
Public Class Methods
# File lib/tabulous/tabulous.rb, line 3 def setup(&block) Dsl::Setup.process(&block) end