Padrino enhances the Sinatra ‘render’ method to have support for automatic template engine detection, enhanced layout functionality, locale enabled rendering, among other features.
Defines common content-type alias mappings.
Default options used in the resolve_template-method.
This is an array of file patterns to ignore. If your editor add a suffix during editing to your files please add it like:
@example
Padrino::Rendering::IGNORE_FILE_PATTERN << /~$/
Default engine configurations for Padrino::Rendering.
@return {Hash<Symbol,Hash>}
The configurations, keyed by engine.
# File lib/padrino/rendering.rb, line 54 def engine_configurations @engine_configurations ||= {} end
# File lib/padrino/rendering.rb, line 69 def included(base) base.send(:include, InstanceMethods) base.extend(ClassMethods) end
# File lib/padrino/rendering.rb, line 58 def registered(app) if defined?(Padrino::Application) && app == Padrino::Application # this fail can be removed later when jRuby is not bugged and MRI19 is dropped fail 'Please, do not use `register` on Padrino::Application object, use `.dup` or subclassing' end included(app) engine_configurations.each do |engine, configs| app.set engine, configs end end