Class: Envandle::PathReference
- Inherits:
-
Object
- Object
- Envandle::PathReference
- Extended by:
- AsReference
- Defined in:
- lib/envandle/path_reference.rb
Instance Method Summary collapse
-
#initialize(context, name, path) ⇒ PathReference
constructor
A new instance of PathReference.
- #spec ⇒ Object
- #to_executable_argset(base) ⇒ Object
Methods included from AsReference
Constructor Details
#initialize(context, name, path) ⇒ PathReference
Returns a new instance of PathReference.
5 6 7 8 9 |
# File 'lib/envandle/path_reference.rb', line 5 def initialize(context, name, path) @context = context @name = name @path = path end |
Instance Method Details
#spec ⇒ Object
11 12 13 |
# File 'lib/envandle/path_reference.rb', line 11 def spec @spec ||= Gemspec.new(Gemspec.find_file(@path, name: @name)) end |
#to_executable_argset(base) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/envandle/path_reference.rb', line 15 def to_executable_argset(base) args = base.dup args.clear_reference args.args[0] = @name args.[:path] = @path Argset.new(:gem, *args.) end |