Class: Bundler::Multilock::UI::Capture
- Inherits:
-
UI::Silent
- Object
- UI::Silent
- Bundler::Multilock::UI::Capture
- Defined in:
- lib/bundler/multilock/ui/capture.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_color(string, _color) ⇒ Object
-
#initialize ⇒ Capture
constructor
A new instance of Capture.
- #replay ⇒ Object
Constructor Details
#initialize ⇒ Capture
Returns a new instance of Capture.
18 19 20 21 22 |
# File 'lib/bundler/multilock/ui/capture.rb', line 18 def initialize = [] super end |
Class Method Details
.capture ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/bundler/multilock/ui/capture.rb', line 8 def capture original_ui = Bundler.ui Bundler.ui = new yield Bundler.ui ensure Bundler.ui = original_ui end |
Instance Method Details
#add_color(string, _color) ⇒ Object
31 32 33 |
# File 'lib/bundler/multilock/ui/capture.rb', line 31 def add_color(string, _color) string end |
#replay ⇒ Object
24 25 26 27 28 29 |
# File 'lib/bundler/multilock/ui/capture.rb', line 24 def replay .each do |(level, args)| Bundler.ui.send(level, *args) end nil end |