Class: Moka::PageScope

Inherits:
Object show all
Includes:
Helpers, LipsumHelpers, PartialsInclusion, SiteTree
Defined in:
lib/commands/lib/page_scope.rb

Constant Summary

Constants included from SiteTree

SiteTree::RESERVED_NAMES

Instance Method Summary collapse

Methods included from PartialsInclusion

#partial

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_bindingObject

returns a binding to the object



24
25
26
# File 'lib/commands/lib/page_scope.rb', line 24

def get_binding
  binding
end