Module: Script::Output

Defined in:
lib/script/output.rb

Class Method Summary collapse

Class Method Details

.result(step) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/script/output.rb', line 12

def result(step)
  color = :green if step.result == :succeded
  color = :red   if step.result == :failed

  [
    "",
    "#{step.result.capitalize}: #{step.headline}",
    separator
  ].join("\n").colorize(color)
end

.separatorObject



23
24
25
# File 'lib/script/output.rb', line 23

def separator
  "-" * 80
end

.started(step) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/script/output.rb', line 4

def started(step)
  [
    separator,
    "Started: #{step.headline}",
    ""
  ].join("\n").colorize(:yellow)
end