# File lib/bundler/ui/shell.rb, line 21 def add_color(string, *color) @shell.set_color(string, *color) end
# File lib/bundler/ui/shell.rb, line 60 def ask(msg) @shell.ask(msg) end
# File lib/bundler/ui/shell.rb, line 29 def confirm(msg, newline = nil) tell_me(msg, :green, newline) if level("confirm") end
# File lib/bundler/ui/shell.rb, line 48 def debug(msg, newline = nil) tell_me(msg, nil, newline) if debug? end
# File lib/bundler/ui/shell.rb, line 52 def debug? level("debug") end
# File lib/bundler/ui/shell.rb, line 42 def error(msg, newline = nil) return unless level("error") return tell_err(msg, :red, newline) if Bundler.feature_flag.error_on_stderr? tell_me(msg, :red, newline) end
# File lib/bundler/ui/shell.rb, line 25 def info(msg, newline = nil) tell_me(msg, nil, newline) if level("info") end
# File lib/bundler/ui/shell.rb, line 77 def level(name = nil) return @level unless name unless index = LEVELS.index(name) raise "#{name.inspect} is not a valid level" end index <= LEVELS.index(@level) end
# File lib/bundler/ui/shell.rb, line 72 def level=(level) raise ArgumentError unless LEVELS.include?(level.to_s) @level = level.to_s end
# File lib/bundler/ui/shell.rb, line 56 def quiet? level("quiet") end
# File lib/bundler/ui/shell.rb, line 91 def silence(&blk) with_level("silent", &blk) end
# File lib/bundler/ui/shell.rb, line 85 def trace(e, newline = nil, force = false) return unless debug? || force msg = "#{e.class}: #{e.message}\n#{e.backtrace.join("\n ")}" tell_me(msg, nil, newline) end
# File lib/bundler/ui/shell.rb, line 95 def unprinted_warnings [] end
# File lib/bundler/ui/shell.rb, line 33 def warn(msg, newline = nil) return unless level("warn") return if @warning_history.include? msg @warning_history << msg return tell_err(msg, :yellow, newline) if Bundler.feature_flag.error_on_stderr? tell_me(msg, :yellow, newline) end
Generated with the Darkfish Rdoc Generator 2.