Module: Steering::Source
- Defined in:
- lib/steering.rb
Class Method Summary collapse
- .contents ⇒ Object
- .context ⇒ Object
- .path ⇒ Object
- .path=(path) ⇒ Object
- .runtime ⇒ Object
- .runtime_path ⇒ Object
- .runtime_path=(runtime_path) ⇒ Object
- .version ⇒ Object
Class Method Details
.contents ⇒ Object
15 16 17 |
# File 'lib/steering.rb', line 15 def self.contents @contents ||= File.read(path) end |
.context ⇒ Object
19 20 21 |
# File 'lib/steering.rb', line 19 def self.context @context ||= ExecJS.compile(contents) end |
.path ⇒ Object
6 7 8 |
# File 'lib/steering.rb', line 6 def self.path @path ||= ENV["HANDLEBARS_SOURCE_PATH"] || bundled_path end |
.path=(path) ⇒ Object
10 11 12 13 |
# File 'lib/steering.rb', line 10 def self.path=(path) @contents = @version = @context = nil @path = path end |
.runtime ⇒ Object
32 33 34 |
# File 'lib/steering.rb', line 32 def self.runtime @runtime_contents ||= File.read(runtime_path) end |
.runtime_path ⇒ Object
23 24 25 |
# File 'lib/steering.rb', line 23 def self.runtime_path @runtime_path ||= ENV["HANDLEBARS_RUNTIME_PATH"] || bundled_runtime_path end |
.runtime_path=(runtime_path) ⇒ Object
27 28 29 30 |
# File 'lib/steering.rb', line 27 def self.runtime_path=(runtime_path) @runtime = nil @runtime_path = runtime_path end |
.version ⇒ Object
36 37 38 |
# File 'lib/steering.rb', line 36 def self.version @version ||= context.eval("Handlebars.VERSION") end |