Parent

Included Modules

Class Index [+]

Quicksearch

Bundler::LazySpecification

Attributes

name[R]
version[R]
dependencies[R]
platform[R]
source[RW]

Public Class Methods

new(name, version, platform, source = nil) click to toggle source
    # File lib/bundler/lazy_specification.rb, line 11
11:     def initialize(name, version, platform, source = nil)
12:       @name          = name
13:       @version       = version
14:       @dependencies  = []
15:       @platform      = platform
16:       @source        = source
17:       @specification = nil
18:     end

Public Instance Methods

==(other) click to toggle source
    # File lib/bundler/lazy_specification.rb, line 28
28:     def ==(other)
29:       [name, version, dependencies, platform, source] ==
30:         [other.name, other.version, other.dependencies, other.platform, other.source]
31:     end
__materialize__() click to toggle source
    # File lib/bundler/lazy_specification.rb, line 52
52:     def __materialize__
53:       @specification = source.specs.search(Gem::Dependency.new(name, version)).last
54:     end
full_name() click to toggle source
    # File lib/bundler/lazy_specification.rb, line 20
20:     def full_name
21:       if platform == Gem::Platform::RUBY or platform.nil? then
22:         "#{@name}-#{@version}"
23:       else
24:         "#{@name}-#{@version}-#{platform}"
25:       end
26:     end
respond_to?(*args) click to toggle source
    # File lib/bundler/lazy_specification.rb, line 56
56:     def respond_to?(*args)
57:       super || @specification.respond_to?(*args)
58:     end
satisfies?(dependency) click to toggle source
    # File lib/bundler/lazy_specification.rb, line 33
33:     def satisfies?(dependency)
34:       @name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version))
35:     end
to_lock() click to toggle source
    # File lib/bundler/lazy_specification.rb, line 37
37:     def to_lock
38:       if platform == Gem::Platform::RUBY or platform.nil?
39:         out = "    #{name} (#{version})\n"
40:       else
41:         out = "    #{name} (#{version}-#{platform})\n"
42:       end
43: 
44:       dependencies.sort_by {|d| d.to_s }.each do |dep|
45:         next if dep.type == :development
46:         out << "    #{dep.to_lock}\n"
47:       end
48: 
49:       out
50:     end
to_s() click to toggle source
    # File lib/bundler/lazy_specification.rb, line 60
60:     def to_s
61:       "#{name} (#{version})"
62:     end

Private Instance Methods

method_missing(method, *args, &blk) click to toggle source
    # File lib/bundler/lazy_specification.rb, line 70
70:     def method_missing(method, *args, &blk)
71:       raise "LazySpecification has not been materialized yet (calling :#{method} #{args.inspect})" unless @specification
72: 
73:       return super unless respond_to?(method)
74: 
75:       @specification.send(method, *args, &blk)
76:     end
to_ary() click to toggle source
    # File lib/bundler/lazy_specification.rb, line 66
66:     def to_ary
67:       nil
68:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.