Module: Themify
- Defined in:
- lib/themify.rb,
lib/themify/engine.rb,
lib/themify/version.rb,
lib/themify/template.rb,
lib/themify/template_engine.rb
Defined Under Namespace
Classes: Railtie, Template, TemplateEngine
Constant Summary collapse
- VERSION =
'0.0.1'
Class Attribute Summary collapse
-
.templates ⇒ Object
Returns the value of attribute templates.
Class Method Summary collapse
-
.add_template(template) ⇒ Object
Adds a template to an internal list of templates Argument must be an instance of Themify::Template.
- .generate_js ⇒ Object
Class Attribute Details
.templates ⇒ Object
Returns the value of attribute templates.
8 9 10 |
# File 'lib/themify.rb', line 8 def templates @templates end |
Class Method Details
.add_template(template) ⇒ Object
Adds a template to an internal list of templates Argument must be an instance of Themify::Template
14 15 16 17 |
# File 'lib/themify.rb', line 14 def self.add_template(template) self.templates ||= [] self.templates << template end |
.generate_js ⇒ Object
19 20 21 |
# File 'lib/themify.rb', line 19 def self.generate_js 'window.Themify = {}; window.Themify.templates = ' + templates.to_json end |