Class: Rubypack::QuietOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypack/shell_output.rb

Overview

Class used to supress all message to the stdout/stderr.

Direct Known Subclasses

DefaultOutput

Instance Method Summary collapse

Instance Method Details

#error(*messages) ⇒ Object



24
25
26
# File 'lib/rubypack/shell_output.rb', line 24

def error(*messages)
  # nothing to do
end

#status(*messages) ⇒ Object



16
17
18
# File 'lib/rubypack/shell_output.rb', line 16

def status(*messages)
  # nothing to do
end

#step(action) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/rubypack/shell_output.rb', line 5

def step(action)
  status(action)
  result = yield
  status('  [ OK ]')
  result
rescue => exception
  error('  [ FAIL ]', exception.message)
  verbose(exception.backtrace.join("\n"))
  nil
end

#verbose(*messages) ⇒ Object



20
21
22
# File 'lib/rubypack/shell_output.rb', line 20

def verbose(*messages)
  # nothing to do
end