Class: GHWikiTools::SnippetContext
- Inherits:
-
Object
- Object
- GHWikiTools::SnippetContext
- Defined in:
- lib/ghwikitools/snippet.rb
Overview
SnippetContext provides snippet rendering informations.
Class Method Summary collapse
-
.create(page) ⇒ Binding
Return the context as binding object.
Instance Method Summary collapse
-
#binding ⇒ Binding
Return the environment binding object.
-
#initialize(page) ⇒ SnippetContext
constructor
A new instance of SnippetContext.
Constructor Details
#initialize(page) ⇒ SnippetContext
Returns a new instance of SnippetContext.
36 37 38 |
# File 'lib/ghwikitools/snippet.rb', line 36 def initialize(page) @page = page end |
Class Method Details
.create(page) ⇒ Binding
Return the context as binding object.
29 30 31 |
# File 'lib/ghwikitools/snippet.rb', line 29 def create(page) new(page).binding end |
Instance Method Details
#binding ⇒ Binding
Return the environment binding object.
44 45 46 |
# File 'lib/ghwikitools/snippet.rb', line 44 def binding Kernel.binding end |