Sha256: 269610fd33fdae5636c1d6de43e340994dbf6e3d9e3dc1606b553a32726b6392

Contents?: true

Size: 764 Bytes

Versions: 53

Compression:

Stored size: 764 Bytes

Contents

# frozen_string_literal: true
module Bundler
  class DepProxy
    attr_reader :__platform, :dep

    def initialize(dep, platform)
      @dep = dep
      @__platform = platform
    end

    def hash
      @hash ||= dep.hash
    end

    def ==(other)
      dep == other.dep && __platform == other.__platform
    end

    alias_method :eql?, :==

    def type
      @dep.type
    end

    def name
      @dep.name
    end

    def requirement
      @dep.requirement
    end

    def to_s
      s = name.dup
      s << " (#{requirement})" unless requirement == Gem::Requirement.default
      s << " #{__platform}" unless __platform == Gem::Platform::RUBY
      s
    end

  private

    def method_missing(*args, &blk)
      @dep.send(*args, &blk)
    end
  end
end

Version data entries

53 entries across 53 versions & 3 rubygems

Version Path
rubygems-update-2.6.14 bundler/lib/bundler/dep_proxy.rb
rubygems-update-2.6.13 bundler/lib/bundler/dep_proxy.rb
bundler-1.15.4 lib/bundler/dep_proxy.rb
bundler-1.15.3 lib/bundler/dep_proxy.rb
bundler-1.15.2 lib/bundler/dep_proxy.rb
bundler-1.15.1 lib/bundler/dep_proxy.rb
bundler-1.15.0 lib/bundler/dep_proxy.rb
bundler-1.15.0.pre.4 lib/bundler/dep_proxy.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/bundler-1.14.6/lib/bundler/dep_proxy.rb
bundler-1.15.0.pre.3 lib/bundler/dep_proxy.rb
rubygems-update-2.6.12 bundler/lib/bundler/dep_proxy.rb
bundler-1.15.0.pre.2 lib/bundler/dep_proxy.rb
bundler-1.15.0.pre.1 lib/bundler/dep_proxy.rb
rubygems-update-2.6.11 bundler/lib/bundler/dep_proxy.rb
bundler-1.14.6 lib/bundler/dep_proxy.rb
bundler-1.14.5 lib/bundler/dep_proxy.rb
bundler-1.14.4 lib/bundler/dep_proxy.rb
bundler-1.14.3 lib/bundler/dep_proxy.rb
rubygems-update-2.6.10 bundler/lib/bundler/dep_proxy.rb
bundler-1.14.2 lib/bundler/dep_proxy.rb