Helpers related to buffer output for various template engines.
Modules: SinatraCurrentEngine Classes: AbstractHandler, ErbHandler, HamlHandler, HamlitHandler, SlimHandler
.handlers ⇒ Object
Returns the list of all available template handlers. .register(engine, handler) ⇒ Object
Registers a new handler as available to the output helpers. #block_is_template?(block) ⇒ Boolean
Returns true if the block is from a supported template type; false otherwise. #capture_html(*args, &block) ⇒ String (also: #capture)
Captures the html from a block of template code for any available handler. #concat_content(text = "") ⇒ Object (also: #concat)
Outputs the given text to the templates buffer directly. #concat_safe_content(text = "") ⇒ Object
Outputs the given text to the templates buffer directly, assuming that it is safe. #content_for(key, content = nil, options = {}, &block) ⇒ Object
Capture a block or text of content to be rendered at a later time. #content_for?(key) ⇒ TrueClass, FalseClass
Is there a content block for a given key?. #yield_content(key, *args) ⇒ String
Render the captured content blocks for a given key. Returns the list of all available template handlers.
Registers a new handler as available to the output helpers.
Returns true if the block is from a supported template type; false otherwise. Used to determine if html should be returned or concatenated to the view.
Captures the html from a block of template code for any available handler.
Be aware that trusting the html is up to the caller.
Outputs the given text to the templates buffer directly.
The output might be subject to escaping, if it is not marked as safe.
Outputs the given text to the templates buffer directly, assuming that it is safe.
Capture a block or text of content to be rendered at a later time. Your blocks can also receive values, which are passed to them by yield_content
.
Is there a content block for a given key?
Render the captured content blocks for a given key. You can also pass values to the content blocks by passing them as arguments after the key.
© 2010–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Helpers/OutputHelpers