Class: Hologram::TemplateVariables
- Inherits:
-
Object
- Object
- Hologram::TemplateVariables
- Defined in:
- lib/hologram/template_variables.rb
Overview
Helper class for binding things for ERB
Instance Attribute Summary collapse
-
#blocks ⇒ Object
Returns the value of attribute blocks.
-
#config ⇒ Object
Returns the value of attribute config.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#output_files_by_category ⇒ Object
Returns the value of attribute output_files_by_category.
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(args) ⇒ TemplateVariables
constructor
A new instance of TemplateVariables.
- #set_args(args) ⇒ Object
Constructor Details
#initialize(args) ⇒ TemplateVariables
Returns a new instance of TemplateVariables.
7 8 9 |
# File 'lib/hologram/template_variables.rb', line 7 def initialize(args) set_args(args) end |
Instance Attribute Details
#blocks ⇒ Object
Returns the value of attribute blocks.
5 6 7 |
# File 'lib/hologram/template_variables.rb', line 5 def blocks @blocks end |
#config ⇒ Object
Returns the value of attribute config.
5 6 7 |
# File 'lib/hologram/template_variables.rb', line 5 def config @config end |
#file_name ⇒ Object
Returns the value of attribute file_name.
5 6 7 |
# File 'lib/hologram/template_variables.rb', line 5 def file_name @file_name end |
#output_files_by_category ⇒ Object
Returns the value of attribute output_files_by_category.
5 6 7 |
# File 'lib/hologram/template_variables.rb', line 5 def output_files_by_category @output_files_by_category end |
#pages ⇒ Object
Returns the value of attribute pages.
5 6 7 |
# File 'lib/hologram/template_variables.rb', line 5 def pages @pages end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/hologram/template_variables.rb', line 5 def title @title end |
Instance Method Details
#get_binding ⇒ Object
17 18 19 |
# File 'lib/hologram/template_variables.rb', line 17 def get_binding binding() end |
#set_args(args) ⇒ Object
11 12 13 14 15 |
# File 'lib/hologram/template_variables.rb', line 11 def set_args(args) args.each do |k,v| instance_variable_set("@#{k}", v) end end |