Class: GemContribute::Output::Null

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_contribute/output/null.rb

Overview

No-op output sink. Inject into CLI verbs in tests that don’t care about output (or want to assert on a separate capturing double).

‘#progress` accepts a block (mirroring `Output::Standard#progress`) and yields it; the spinner machinery is skipped entirely.

Instance Method Summary collapse

Instance Method Details

#error(_message) ⇒ Object



13
# File 'lib/gem_contribute/output/null.rb', line 13

def error(_message) = nil

#info(_message) ⇒ Object



11
# File 'lib/gem_contribute/output/null.rb', line 11

def info(_message) = nil

#progress(_message) ⇒ Object



15
16
17
# File 'lib/gem_contribute/output/null.rb', line 15

def progress(_message)
  block_given? ? yield : nil
end

#warn(_message) ⇒ Object



12
# File 'lib/gem_contribute/output/null.rb', line 12

def warn(_message) = nil