class GHWikiTools::SnippetContext

SnippetContext provides snippet rendering informations.

Public Class Methods

create(page) click to toggle source

Return the context as binding object.

@param page [Page]

the page that the snippet embeds in it

@return [Binding]

snippet context as binding object
# File lib/ghwikitools/snippet.rb, line 29
def create(page)
  new(page).binding
end
new(page) click to toggle source

@param page [Page]

the page that the snippet embeds in it
# File lib/ghwikitools/snippet.rb, line 36
def initialize(page)
  @page = page
end

Public Instance Methods

binding() click to toggle source

Return the environment binding object.

@return [Binding]

the environment binding object
# File lib/ghwikitools/snippet.rb, line 44
def binding
  Kernel.binding
end