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

- (DepProxy) initialize(dep, platform)

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

- (Object) method_missing(*args) (private)



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

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

Instance Attribute Details

- (Object) __platform (readonly)

Returns the value of attribute __platform



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

def __platform
  @__platform
end

- (Object) dep (readonly)

Returns the value of attribute dep



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

def dep
  @dep
end

- (Object) required_by (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

- (Object) ==(o) Also known as: eql?



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

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

- (Object) hash



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

def hash
  @hash ||= dep.hash
end

- (Object) name



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

def name
  @dep.name
end

- (Object) requirement



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

def requirement
  @dep.requirement
end

- (Object) to_s



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

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

- (Object) type



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

def type
  @dep.type
end