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 = nil, newline = nil) ⇒ Object
- #confirm? ⇒ Boolean
- #debug(message = nil, newline = nil) ⇒ Object
- #debug? ⇒ Boolean
- #error(message = nil, newline = nil) ⇒ Object
- #error? ⇒ Boolean
- #info(message = nil, newline = nil) ⇒ Object
- #info? ⇒ Boolean
-
#initialize ⇒ Silent
constructor
A new instance of Silent.
- #level(name = nil) ⇒ Object
- #level=(name) ⇒ Object
- #no?(msg) ⇒ Boolean
- #output_stream ⇒ Object
- #output_stream=(_symbol) ⇒ Object
- #progress ⇒ Object
- #quiet? ⇒ Boolean
- #silence ⇒ Object
- #trace(message, newline = nil, force = false) ⇒ Object
- #unprinted_warnings ⇒ Object
- #warn(message = nil, newline = nil) ⇒ Object
- #warn? ⇒ Boolean
- #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
63 64 |
# File 'lib/bundler/ui/silent.rb', line 63 def ask() end |
#confirm(message = nil, newline = nil) ⇒ Object
19 20 |
# File 'lib/bundler/ui/silent.rb', line 19 def confirm( = nil, newline = nil) end |
#confirm? ⇒ Boolean
32 33 34 |
# File 'lib/bundler/ui/silent.rb', line 32 def confirm? false end |
#debug(message = nil, newline = nil) ⇒ Object
29 30 |
# File 'lib/bundler/ui/silent.rb', line 29 def debug( = nil, newline = nil) end |
#debug? ⇒ Boolean
40 41 42 |
# File 'lib/bundler/ui/silent.rb', line 40 def debug? false end |
#error(message = nil, newline = nil) ⇒ Object
26 27 |
# File 'lib/bundler/ui/silent.rb', line 26 def error( = nil, newline = nil) end |
#error? ⇒ Boolean
36 37 38 |
# File 'lib/bundler/ui/silent.rb', line 36 def error? false end |
#info(message = nil, newline = nil) ⇒ Object
16 17 |
# File 'lib/bundler/ui/silent.rb', line 16 def info( = nil, newline = nil) end |
#info? ⇒ Boolean
44 45 46 |
# File 'lib/bundler/ui/silent.rb', line 44 def info? false end |
#level(name = nil) ⇒ Object
77 78 |
# File 'lib/bundler/ui/silent.rb', line 77 def level(name = nil) end |
#level=(name) ⇒ Object
74 75 |
# File 'lib/bundler/ui/silent.rb', line 74 def level=(name) end |
#no?(msg) ⇒ Boolean
70 71 72 |
# File 'lib/bundler/ui/silent.rb', line 70 def no?(msg) raise "Cannot ask no? with a silent shell" end |
#output_stream ⇒ Object
59 60 61 |
# File 'lib/bundler/ui/silent.rb', line 59 def output_stream nil end |
#output_stream=(_symbol) ⇒ Object
56 57 |
# File 'lib/bundler/ui/silent.rb', line 56 def output_stream=(_symbol) end |
#progress ⇒ Object
87 88 89 |
# File 'lib/bundler/ui/silent.rb', line 87 def progress yield end |
#quiet? ⇒ Boolean
48 49 50 |
# File 'lib/bundler/ui/silent.rb', line 48 def quiet? false end |
#silence ⇒ Object
83 84 85 |
# File 'lib/bundler/ui/silent.rb', line 83 def silence yield end |
#trace(message, newline = nil, force = false) ⇒ Object
80 81 |
# File 'lib/bundler/ui/silent.rb', line 80 def trace(, newline = nil, force = false) end |
#unprinted_warnings ⇒ Object
91 92 93 |
# File 'lib/bundler/ui/silent.rb', line 91 def unprinted_warnings @warnings end |
#warn(message = nil, newline = nil) ⇒ Object
22 23 24 |
# File 'lib/bundler/ui/silent.rb', line 22 def warn( = nil, newline = nil) @warnings |= [] end |
#warn? ⇒ Boolean
52 53 54 |
# File 'lib/bundler/ui/silent.rb', line 52 def warn? false end |
#yes?(msg) ⇒ Boolean
66 67 68 |
# File 'lib/bundler/ui/silent.rb', line 66 def yes?(msg) raise "Cannot ask yes? with a silent shell" end |