Module: Retter::Page::Base
- Includes:
- Site
- Defined in:
- lib/retter/page/base.rb
Defined Under Namespace
Classes: ViewContext
Instance Attribute Summary collapse
-
#path_prefix ⇒ Object
readonly
Returns the value of attribute path_prefix.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
Methods included from Site
#config, #entries, #load, #reset!
Methods included from Configurable
#configurable, #define_configurable_method, #define_instance_shortcut_method
Instance Attribute Details
#path_prefix ⇒ Object (readonly)
Returns the value of attribute path_prefix.
12 13 14 |
# File 'lib/retter/page/base.rb', line 12 def path_prefix @path_prefix end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
12 13 14 |
# File 'lib/retter/page/base.rb', line 12 def title @title end |
Instance Method Details
#bind ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/retter/page/base.rb', line 19 def bind context = ViewContext.new part = Tilt.new( template_path.to_path, ugly: true, filename: template_path.to_path ).render(context) print part end |
#initialize ⇒ Object
14 15 16 17 |
# File 'lib/retter/page/base.rb', line 14 def initialize @path_prefix = './' @title = config.title end |
#path ⇒ Object
30 31 32 |
# File 'lib/retter/page/base.rb', line 30 def path raise NotImplementedError end |
#template_path ⇒ Object
34 35 36 |
# File 'lib/retter/page/base.rb', line 34 def template_path raise NotImplementedError end |