Class: Bundler::DepProxy

Inherits:
Object
  • 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.



153
154
155
# File 'lib/bundler/rubygems_ext.rb', line 153

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)



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

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

Instance Attribute Details

#__platformObject (readonly)

Returns the value of attribute __platform.



151
152
153
# File 'lib/bundler/rubygems_ext.rb', line 151

def __platform
  @__platform
end

#depObject (readonly)

Returns the value of attribute dep.



151
152
153
# File 'lib/bundler/rubygems_ext.rb', line 151

def dep
  @dep
end

#required_byObject (readonly)

Returns the value of attribute required_by.



151
152
153
# File 'lib/bundler/rubygems_ext.rb', line 151

def required_by
  @required_by
end

Instance Method Details

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



161
162
163
# File 'lib/bundler/rubygems_ext.rb', line 161

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

#hashObject



157
158
159
# File 'lib/bundler/rubygems_ext.rb', line 157

def hash
  @hash ||= dep.hash
end

#to_sObject



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

def to_s
  @dep.to_s
end

#typeObject



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

def type
  @dep.type
end