Module: Hanami::View
- Includes:
- Utils::ClassAttribute
- Defined in:
- gems/gems/hanami-view-1.3.1/lib/hanami/view.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/dsl.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/errors.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/escape.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/version.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/template.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/inheritable.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/configuration.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/scope.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/options.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/partial.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/registry.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/subscope.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/template.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/null_view.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/null_local.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/null_layout.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/view_finder.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/layout_scope.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/partial_file.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/layout_finder.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/null_template.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/template_name.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/partial_finder.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/layout_registry.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/template_finder.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/templates_finder.rb,
gems/gems/hanami-view-1.3.1/lib/hanami/view/rendering/partial_templates_finder.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/dsl.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/errors.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/escape.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/version.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/template.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/inheritable.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/configuration.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/scope.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/options.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/partial.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/registry.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/subscope.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/template.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/null_view.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/null_local.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/null_layout.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/view_finder.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/layout_scope.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/partial_file.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/layout_finder.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/null_template.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/template_name.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/partial_finder.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/layout_registry.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/template_finder.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/templates_finder.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view/rendering/partial_templates_finder.rb,
gems/gems/hanami-view-1.3.3/lib/hanami/view.rb
Overview
View
Defined Under Namespace
Modules: Dsl, Escape, Inheritable, Rendering Classes: Configuration, Error, MissingFormatError, MissingTemplateError, MissingTemplateLayoutError, Template, UnknownRenderTypeError
Constant Summary
- VERSION =
Defines the version
'1.3.3'.freeze
Class Method Summary collapse
-
.configure(&blk) ⇒ Object
Configure the framework.
-
.duplicate(mod, views = 'Views', &blk) ⇒ Module
Duplicate the framework and generate modules for the target application.
Class Method Details
.configure(&blk) ⇒ Object
Configure the framework. It yields the given block in the context of the configuration
Source: | on GitHub
def self.configure(&blk) configuration.instance_eval(&blk) end |
.duplicate(mod, views = 'Views', &blk) ⇒ Module
Duplicate the framework and generate modules for the target application
module MyApp::Views::Dashboard class Index include MyApp::View end end
Source: | on GitHub
def self.duplicate(mod, views = 'Views', &blk) dupe.tap do |duplicated| mod.module_eval %{ module #{ views }; end } if views mod.module_eval %{ Layout = Hanami::Layout.dup Presenter = Hanami::Presenter.dup } duplicated.configure do namespace [mod, views].compact.join '::' end duplicated.configure(&blk) if block_given? end end |