Class: Monograph::TemplateContext

Inherits:
Object
  • Object
show all
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

BookTemplateContext, ChapterTemplateContext

Instance Method Summary collapse

Instance Method Details

#bookObject



6
7
# File 'lib/monograph/template_context.rb', line 6

def book
end

#get_bindingObject



21
22
23
# File 'lib/monograph/template_context.rb', line 21

def get_binding
  binding
end

#next_pageObject

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_titleObject

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_pageObject

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