# File lib/bundler/dependency.rb, line 25 25: def initialize(name, version, options = {}, &blk) 26: super(name, version) 27: 28: @autorequire = nil 29: @groups = Array(options["group"] || :default).map { |g| g.to_sym } 30: @source = options["source"] 31: @platforms = Array(options["platforms"]) 32: @env = options["env"] 33: 34: if options.key?('require') 35: @autorequire = Array(options['require'] || []) 36: end 37: end
# File lib/bundler/dependency.rb, line 55 55: def current_env? 56: return true unless @env 57: if Hash === @env 58: @env.all? do |key, val| 59: ENV[key.to_s] && (String === val ? ENV[key.to_s] == val : ENV[key.to_s] =~ val) 60: end 61: else 62: ENV[@env.to_s] 63: end 64: end
# File lib/bundler/dependency.rb, line 66 66: def current_platform? 67: return true if @platforms.empty? 68: @platforms.any? { |p| send("#{p}?") } 69: end
# File lib/bundler/dependency.rb, line 39 39: def gem_platforms(valid_platforms) 40: return valid_platforms if @platforms.empty? 41: 42: platforms = [] 43: @platforms.each do |p| 44: platform = PLATFORM_MAP[p] 45: next unless valid_platforms.include?(platform) 46: platforms |= [platform] 47: end 48: platforms 49: end
# File lib/bundler/dependency.rb, line 109 109: def jruby? 110: defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" 111: end
# File lib/bundler/dependency.rb, line 117 117: def mingw? 118: Bundler::WINDOWS && Gem::Platform.local.os == "mingw32" 119: end
# File lib/bundler/dependency.rb, line 121 121: def mingw_18? 122: mingw? && RUBY_VERSION < "1.9" 123: end
# File lib/bundler/dependency.rb, line 125 125: def mingw_19? 126: mingw? && RUBY_VERSION >= "1.9" 127: end
# File lib/bundler/dependency.rb, line 97 97: def mri? 98: !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") 99: end
# File lib/bundler/dependency.rb, line 101 101: def mri_18? 102: mri? && RUBY_VERSION < "1.9" 103: end
# File lib/bundler/dependency.rb, line 105 105: def mri_19? 106: mri? && RUBY_VERSION >= "1.9" 107: end
# File lib/bundler/dependency.rb, line 113 113: def mswin? 114: Bundler::WINDOWS 115: end
# File lib/bundler/dependency.rb, line 85 85: def ruby? 86: !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx") 87: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.