Module: Handlebars::Source
- Defined in:
- lib/handlebars.rb
Class Method Summary collapse
Class Method Details
.contents ⇒ Object
11 12 13 |
# File 'lib/handlebars.rb', line 11 def self.contents @contents ||= File.read(path) end |
.context ⇒ Object
20 21 22 |
# File 'lib/handlebars.rb', line 20 def self.context @context ||= ExecJS.compile(contents) end |
.path ⇒ Object
7 8 9 |
# File 'lib/handlebars.rb', line 7 def self.path @path ||= bundled_path end |
.version ⇒ Object
15 16 17 18 |
# File 'lib/handlebars.rb', line 15 def self.version # var VERSION = "1.3.0"; @version ||= contents[/var\sVERSION\s=\s\'([\d.]+)\'/, 1] end |