Class: Bundler::DepProxy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dep, platform) ⇒ DepProxy

Returns a new instance of DepProxy.



170
171
172
# File 'lib/bundler/rubygems_ext.rb', line 170

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)



194
195
196
# File 'lib/bundler/rubygems_ext.rb', line 194

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

Instance Attribute Details

#__platformObject (readonly)

Returns the value of attribute __platform.



168
169
170
# File 'lib/bundler/rubygems_ext.rb', line 168

def __platform
  @__platform
end

#depObject (readonly)

Returns the value of attribute dep.



168
169
170
# File 'lib/bundler/rubygems_ext.rb', line 168

def dep
  @dep
end

#required_byObject (readonly)

Returns the value of attribute required_by.



168
169
170
# File 'lib/bundler/rubygems_ext.rb', line 168

def required_by
  @required_by
end

Instance Method Details

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



178
179
180
# File 'lib/bundler/rubygems_ext.rb', line 178

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

#hashObject



174
175
176
# File 'lib/bundler/rubygems_ext.rb', line 174

def hash
  @hash ||= dep.hash
end

#to_sObject



188
189
190
# File 'lib/bundler/rubygems_ext.rb', line 188

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

#typeObject



184
185
186
# File 'lib/bundler/rubygems_ext.rb', line 184

def type
  @dep.type
end