Class Index [+]

Quicksearch

Bundler::Dependency

Constants

PLATFORM_MAP

Attributes

autorequire[R]
groups[R]
platforms[R]

Public Class Methods

new(name, version, options = {}, &blk) click to toggle source
    # File lib/bundler/dependency.rb, line 26
26:     def initialize(name, version, options = {}, &blk)
27:       type = options["type"] || :runtime
28:       super(name, version, type)
29: 
30:       @autorequire = nil
31:       @groups      = Array(options["group"] || :default).map { |g| g.to_sym }
32:       @source      = options["source"]
33:       @platforms   = Array(options["platforms"])
34:       @env         = options["env"]
35: 
36:       if options.key?('require')
37:         @autorequire = Array(options['require'] || [])
38:       end
39:     end

Public Instance Methods

current_env?() click to toggle source
    # File lib/bundler/dependency.rb, line 57
57:     def current_env?
58:       return true unless @env
59:       if Hash === @env
60:         @env.all? do |key, val|
61:           ENV[key.to_s] && (String === val ? ENV[key.to_s] == val : ENV[key.to_s] =~ val)
62:         end
63:       else
64:         ENV[@env.to_s]
65:       end
66:     end
current_platform?() click to toggle source
    # File lib/bundler/dependency.rb, line 68
68:     def current_platform?
69:       return true if @platforms.empty?
70:       @platforms.any? { |p| send("#{p}?") }
71:     end
gem_platforms(valid_platforms) click to toggle source
    # File lib/bundler/dependency.rb, line 41
41:     def gem_platforms(valid_platforms)
42:       return valid_platforms if @platforms.empty?
43: 
44:       platforms = []
45:       @platforms.each do |p|
46:         platform = PLATFORM_MAP[p]
47:         next unless valid_platforms.include?(platform)
48:         platforms |= [platform]
49:       end
50:       platforms
51:     end
should_include?() click to toggle source
    # File lib/bundler/dependency.rb, line 53
53:     def should_include?
54:       current_env? && current_platform?
55:     end
to_lock() click to toggle source
    # File lib/bundler/dependency.rb, line 73
73:     def to_lock
74:       out = super
75:       out << '!' if source
76:       out << "\n"
77:     end

Private Instance Methods

jruby?() click to toggle source
     # File lib/bundler/dependency.rb, line 109
109:     def jruby?
110:       defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
111:     end
maglev?() click to toggle source
     # File lib/bundler/dependency.rb, line 113
113:     def maglev?
114:       defined?(RUBY_ENGINE) && RUBY_ENGINE == "maglev"
115:     end
mingw?() click to toggle source
     # File lib/bundler/dependency.rb, line 121
121:     def mingw?
122:       Bundler::WINDOWS && Gem::Platform.local.os == "mingw32"
123:     end
mingw_18?() click to toggle source
     # File lib/bundler/dependency.rb, line 125
125:     def mingw_18?
126:       mingw? && RUBY_VERSION < "1.9"
127:     end
mingw_19?() click to toggle source
     # File lib/bundler/dependency.rb, line 129
129:     def mingw_19?
130:       mingw? && RUBY_VERSION >= "1.9"
131:     end
mri?() click to toggle source
    # File lib/bundler/dependency.rb, line 93
93:     def mri?
94:       !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby")
95:     end
mri_18?() click to toggle source
    # File lib/bundler/dependency.rb, line 97
97:     def mri_18?
98:       mri? && RUBY_VERSION < "1.9"
99:     end
mri_19?() click to toggle source
     # File lib/bundler/dependency.rb, line 101
101:     def mri_19?
102:       mri? && RUBY_VERSION >= "1.9" && RUBY_VERSION < "2.0"
103:     end
mswin?() click to toggle source
     # File lib/bundler/dependency.rb, line 117
117:     def mswin?
118:       Bundler::WINDOWS
119:     end
rbx?() click to toggle source
     # File lib/bundler/dependency.rb, line 105
105:     def rbx?
106:       ruby? && defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
107:     end
ruby?() click to toggle source
    # File lib/bundler/dependency.rb, line 81
81:     def ruby?
82:       !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev")
83:     end
ruby_18?() click to toggle source
    # File lib/bundler/dependency.rb, line 85
85:     def ruby_18?
86:       ruby? && RUBY_VERSION < "1.9"
87:     end
ruby_19?() click to toggle source
    # File lib/bundler/dependency.rb, line 89
89:     def ruby_19?
90:       ruby? && RUBY_VERSION >= "1.9" && RUBY_VERSION < "2.0"
91:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.