Sha256: e3fd2f29e51da9615bd3e85f7087ff2065af3ca89cffe589a1c0d3764037adce

Contents?: true

Size: 752 Bytes

Versions: 9

Compression:

Stored size: 752 Bytes

Contents

require "appraisal/bundler_dsl"
require 'appraisal/utils'

module Appraisal
  class Path < BundlerDSL
    def initialize(source, options = {})
      super()
      @source = source
      @options = options
    end

    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

    # :nodoc:
    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
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
honeybadger-5.4.0 vendor/bundle/ruby/3.2.0/gems/appraisal-2.5.0/lib/appraisal/path.rb
honeybadger-5.3.0 vendor/bundle/ruby/3.2.0/gems/appraisal-2.5.0/lib/appraisal/path.rb
appraisal-2.5.0 lib/appraisal/path.rb
appraisal-2.4.1 lib/appraisal/path.rb
appraisal-2.4.0 lib/appraisal/path.rb
appraisal-2.3.0 lib/appraisal/path.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/appraisal-2.2.0/lib/appraisal/path.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/appraisal-2.2.0/lib/appraisal/path.rb
appraisal-2.2.0 lib/appraisal/path.rb