Class: EmberCLI::PathSet
- Inherits:
-
Object
- Object
- EmberCLI::PathSet
- Defined in:
- lib/ember-cli/path_set.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(app) ⇒ PathSet
constructor
A new instance of PathSet.
Constructor Details
#initialize(app) ⇒ PathSet
Returns a new instance of PathSet.
14 15 16 |
# File 'lib/ember-cli/path_set.rb', line 14 def initialize(app) @app = app end |
Class Method Details
.define_path(name, &definition) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/ember-cli/path_set.rb', line 3 def self.define_path(name, &definition) define_method name do ivar = "@_#{name}_path" if instance_variable_defined?(ivar) instance_variable_get(ivar) else instance_exec(&definition).tap{ |value| instance_variable_set ivar, value } end end end |