Class: Monograph::TemplateContext
- Inherits:
-
Object
- Object
- Monograph::TemplateContext
- Defined in:
- lib/monograph/template_context.rb
Overview
Template contexts are used to provide ERB templates with access to various methods. Each type of context must inherit from TemplateContext.
Direct Known Subclasses
Instance Method Summary collapse
- #book ⇒ Object
- #get_binding ⇒ Object
-
#next_page ⇒ Object
This must return either nil or an object which responds to ‘permalink’ and ‘title’.
-
#page_title ⇒ Object
This title will be displayed in the <title> attribute on the page.
-
#previous_page ⇒ Object
This must return either nil or an object which responds to ‘permalink’ and ‘title’.
Instance Method Details
#book ⇒ Object
6 7 |
# File 'lib/monograph/template_context.rb', line 6 def book end |
#get_binding ⇒ Object
21 22 23 |
# File 'lib/monograph/template_context.rb', line 21 def get_binding binding end |
#next_page ⇒ Object
This must return either nil or an object which responds to ‘permalink’ and ‘title’.
18 19 |
# File 'lib/monograph/template_context.rb', line 18 def next_page end |
#page_title ⇒ Object
This title will be displayed in the <title> attribute on the page.
10 11 |
# File 'lib/monograph/template_context.rb', line 10 def page_title end |
#previous_page ⇒ Object
This must return either nil or an object which responds to ‘permalink’ and ‘title’.
14 15 |
# File 'lib/monograph/template_context.rb', line 14 def previous_page end |