Class: Bundler::DepProxy
| Relationships & Source Files | |
| Inherits: | Object | 
| Defined in: | lib/bundler/dep_proxy.rb | 
Class Method Summary
- .new(dep, platform) ⇒ DepProxy constructor
Instance Attribute Summary
- #__platform readonly
- #dep readonly
Instance Method Summary
- #==(other) (also: #eql?)
- 
    
      #eql?(other)  
    
    Alias for #==. 
- #hash
- #name
- #requirement
- #to_s
- #type
- #method_missing(*args, &blk) private
Constructor Details
    .new(dep, platform)  ⇒ DepProxy 
  
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &blk) (private)
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 44
def method_missing(*args, &blk) @dep.send(*args, &blk) end
Instance Attribute Details
#__platform (readonly)
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 5
attr_reader :__platform, :dep
#dep (readonly)
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 5
attr_reader :__platform, :dep
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 16
def ==(other) return false if other.class != self.class dep == other.dep && __platform == other.__platform end
#eql?(other)
Alias for #==.
# File 'lib/bundler/dep_proxy.rb', line 21
alias_method :eql?, :==
#hash
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 12
def hash @hash ||= [dep, __platform].hash end
#name
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 27
def name @dep.name end
#requirement
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 31
def requirement @dep.requirement end
#to_s
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 35
def to_s s = name.dup s << " (#{requirement})" unless requirement == Gem::Requirement.default s << " #{__platform}" unless __platform == Gem::Platform::RUBY s end
#type
[ GitHub ]# File 'lib/bundler/dep_proxy.rb', line 23
def type @dep.type end