Class: Moka::PageScope
- Includes:
- Helpers, LipsumHelpers, PartialsInclusion, SiteTree
- Defined in:
- lib/commands/lib/page_scope.rb
Constant Summary
Constants included from SiteTree
Instance Method Summary collapse
-
#get_binding ⇒ Object
returns a binding to the object.
-
#initialize(manifest, current_group_name, current_page_name) ⇒ PageScope
constructor
A new instance of PageScope.
Methods included from PartialsInclusion
Methods included from Helpers
#current_page?, #image_tag, #javascript_include_tag, #link_to, #path_to, #stylesheet_link_tag
Constructor Details
#initialize(manifest, current_group_name, current_page_name) ⇒ PageScope
Returns a new instance of PageScope.
17 18 19 20 21 |
# File 'lib/commands/lib/page_scope.rb', line 17 def initialize(manifest, current_group_name, current_page_name) @site = SiteNode.new("site", manifest["site"]) @current_group = @site.find_group(current_group_name) @current_page = @current_group.find_page(current_page_name) end |
Instance Method Details
#get_binding ⇒ Object
returns a binding to the object
24 25 26 |
# File 'lib/commands/lib/page_scope.rb', line 24 def get_binding binding end |