Class: Bundler::UI::Silent
- Inherits:
-
Object
- Object
- Bundler::UI::Silent
- Defined in:
- lib/bundler/ui/silent.rb
Instance Attribute Summary collapse
-
#shell ⇒ Object
writeonly
Sets the attribute shell.
Instance Method Summary collapse
- #add_color(string, color) ⇒ Object
- #ask(message) ⇒ Object
- #confirm(message, newline = nil) ⇒ Object
- #debug(message, newline = nil) ⇒ Object
- #debug? ⇒ Boolean
- #error(message, newline = nil) ⇒ Object
- #info(message, newline = nil) ⇒ Object
-
#initialize ⇒ Silent
constructor
A new instance of Silent.
- #level(name = nil) ⇒ Object
- #level=(name) ⇒ Object
- #no? ⇒ Boolean
- #quiet? ⇒ Boolean
- #silence ⇒ Object
- #trace(message, newline = nil, force = false) ⇒ Object
- #unprinted_warnings ⇒ Object
- #warn(message, newline = nil) ⇒ Object
- #yes?(msg) ⇒ Boolean
Constructor Details
#initialize ⇒ Silent
Returns a new instance of Silent.
8 9 10 |
# File 'lib/bundler/ui/silent.rb', line 8 def initialize @warnings = [] end |
Instance Attribute Details
#shell=(value) ⇒ Object (writeonly)
Sets the attribute shell
6 7 8 |
# File 'lib/bundler/ui/silent.rb', line 6 def shell=(value) @shell = value end |
Instance Method Details
#add_color(string, color) ⇒ Object
12 13 14 |
# File 'lib/bundler/ui/silent.rb', line 12 def add_color(string, color) string end |
#ask(message) ⇒ Object
40 41 |
# File 'lib/bundler/ui/silent.rb', line 40 def ask() end |
#confirm(message, newline = nil) ⇒ Object
19 20 |
# File 'lib/bundler/ui/silent.rb', line 19 def confirm(, newline = nil) end |
#debug(message, newline = nil) ⇒ Object
29 30 |
# File 'lib/bundler/ui/silent.rb', line 29 def debug(, newline = nil) end |
#debug? ⇒ Boolean
32 33 34 |
# File 'lib/bundler/ui/silent.rb', line 32 def debug? false end |
#error(message, newline = nil) ⇒ Object
26 27 |
# File 'lib/bundler/ui/silent.rb', line 26 def error(, newline = nil) end |
#info(message, newline = nil) ⇒ Object
16 17 |
# File 'lib/bundler/ui/silent.rb', line 16 def info(, newline = nil) end |
#level(name = nil) ⇒ Object
54 55 |
# File 'lib/bundler/ui/silent.rb', line 54 def level(name = nil) end |
#level=(name) ⇒ Object
51 52 |
# File 'lib/bundler/ui/silent.rb', line 51 def level=(name) end |
#no? ⇒ Boolean
47 48 49 |
# File 'lib/bundler/ui/silent.rb', line 47 def no? raise "Cannot ask no? with a silent shell" end |
#quiet? ⇒ Boolean
36 37 38 |
# File 'lib/bundler/ui/silent.rb', line 36 def quiet? false end |
#silence ⇒ Object
60 61 62 |
# File 'lib/bundler/ui/silent.rb', line 60 def silence yield end |
#trace(message, newline = nil, force = false) ⇒ Object
57 58 |
# File 'lib/bundler/ui/silent.rb', line 57 def trace(, newline = nil, force = false) end |
#unprinted_warnings ⇒ Object
64 65 66 |
# File 'lib/bundler/ui/silent.rb', line 64 def unprinted_warnings @warnings end |
#warn(message, newline = nil) ⇒ Object
22 23 24 |
# File 'lib/bundler/ui/silent.rb', line 22 def warn(, newline = nil) @warnings |= [] end |
#yes?(msg) ⇒ Boolean
43 44 45 |
# File 'lib/bundler/ui/silent.rb', line 43 def yes?(msg) raise "Cannot ask yes? with a silent shell" end |