Class: Appraisal::Path

Inherits:
BundlerDSL show all
Defined in:
lib/appraisal/path.rb

Constant Summary

Constants inherited from BundlerDSL

BundlerDSL::PARTS

Instance Attribute Summary

Attributes inherited from BundlerDSL

#dependencies

Instance Method Summary collapse

Methods inherited from BundlerDSL

#gem, #gemspec, #git, #git_source, #group, #path, #platforms, #ruby, #run, #source

Constructor Details

#initialize(source, options = {}) ⇒ Path


6
7
8
9
10
# File 'lib/appraisal/path.rb', line 6

def initialize(source, options = {})
  super()
  @source = source
  @options = options
end

Instance Method Details

#for_dupObject

:nodoc:


22
23
24
25
26
27
28
29
# File 'lib/appraisal/path.rb', line 22

def for_dup
  if @options.empty?
    "path #{@source.inspect} do\n#{indent(super)}\nend"
  else
    "path #{@source.inspect}, #{Utils.format_string(@options)} do\n" +
      "#{indent(super)}\nend"
  end
end

#to_sObject


12
13
14
15
16
17
18
19
# File 'lib/appraisal/path.rb', line 12

def to_s
  if @options.empty?
    "path #{Utils.prefix_path(@source).inspect} do\n#{indent(super)}\nend"
  else
    "path #{Utils.prefix_path(@source).inspect}, #{Utils.format_string(@options)} do\n" +
      "#{indent(super)}\nend"
  end
end