# File lib/bundler/dependency.rb, line 22 22: def initialize(name, version, options = {}, &blk) 23: super(name, version) 24: 25: @autorequire = nil 26: @groups = Array(options["group"] || :default).map { |g| g.to_sym } 27: @source = options["source"] 28: @platforms = Array(options["platforms"]) 29: @env = options["env"] 30: 31: if options.key?('require') 32: @autorequire = Array(options['require'] || []) 33: end 34: end
# File lib/bundler/dependency.rb, line 52 52: def current_env? 53: return true unless @env 54: if Hash === @env 55: @env.all? do |key, val| 56: ENV[key.to_s] && (String === val ? ENV[key.to_s] == val : ENV[key.to_s] =~ val) 57: end 58: else 59: ENV[@env.to_s] 60: end 61: end
# File lib/bundler/dependency.rb, line 63 63: def current_platform? 64: return true if @platforms.empty? 65: @platforms.any? { |p| send("#{p}?") } 66: end
# File lib/bundler/dependency.rb, line 36 36: def gem_platforms(valid_platforms) 37: return valid_platforms if @platforms.empty? 38: 39: platforms = [] 40: @platforms.each do |p| 41: platform = PLATFORM_MAP[p] 42: next unless valid_platforms.include?(platform) 43: platforms |= [platform] 44: end 45: platforms 46: end
# File lib/bundler/dependency.rb, line 106 106: def jruby? 107: defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" 108: end
# File lib/bundler/dependency.rb, line 94 94: def mri? 95: !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") 96: end
# File lib/bundler/dependency.rb, line 98 98: def mri_18? 99: mri? && RUBY_VERSION < "1.9" 100: end
# File lib/bundler/dependency.rb, line 102 102: def mri_19? 103: mri? && RUBY_VERSION >= "1.9" 104: end
# File lib/bundler/dependency.rb, line 110 110: def mswin? 111: # w0t? 112: end
# File lib/bundler/dependency.rb, line 82 82: def ruby? 83: !mswin? && (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx") 84: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.