Class: Bundler::DepProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/dep_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dep, platform) ⇒ DepProxy

Returns a new instance of DepProxy



6
7
8
# File 'lib/bundler/dep_proxy.rb', line 6

def initialize(dep, platform)
  @dep, @__platform, @required_by = dep, platform, []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object (private)



38
39
40
# File 'lib/bundler/dep_proxy.rb', line 38

def method_missing(*args)
  @dep.send(*args)
end

Instance Attribute Details

#__platformObject (readonly)

Returns the value of attribute __platform



4
5
6
# File 'lib/bundler/dep_proxy.rb', line 4

def __platform
  @__platform
end

#depObject (readonly)

Returns the value of attribute dep



4
5
6
# File 'lib/bundler/dep_proxy.rb', line 4

def dep
  @dep
end

#required_byObject (readonly)

Returns the value of attribute required_by



4
5
6
# File 'lib/bundler/dep_proxy.rb', line 4

def required_by
  @required_by
end

Instance Method Details

#==(o) ⇒ Object Also known as: eql?



14
15
16
# File 'lib/bundler/dep_proxy.rb', line 14

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

#hashObject



10
11
12
# File 'lib/bundler/dep_proxy.rb', line 10

def hash
  @hash ||= dep.hash
end

#nameObject



24
25
26
# File 'lib/bundler/dep_proxy.rb', line 24

def name
  @dep.name
end

#requirementObject



28
29
30
# File 'lib/bundler/dep_proxy.rb', line 28

def requirement
  @dep.requirement
end

#to_sObject



32
33
34
# File 'lib/bundler/dep_proxy.rb', line 32

def to_s
  "#{name} (#{requirement}) #{__platform}"
end

#typeObject



20
21
22
# File 'lib/bundler/dep_proxy.rb', line 20

def type
  @dep.type
end