Class: Xplenty::Kensa::Client::Screen

Inherits:
Object
  • Object
show all
Includes:
Term::ANSIColor
Defined in:
lib/xplenty/kensa/client.rb

Instance Method Summary collapse

Instance Method Details

#check(msg) ⇒ Object



235
236
237
238
# File 'lib/xplenty/kensa/client.rb', line 235

def check(msg)
  $stdout.puts
  $stdout.print "  Check #{msg}"
end

#error(msg) ⇒ Object



240
241
242
# File 'lib/xplenty/kensa/client.rb', line 240

def error(msg)
  $stdout.print "\n", red("    #{msg}")
end

#finishObject



253
254
255
256
257
# File 'lib/xplenty/kensa/client.rb', line 253

def finish
  $stdout.puts
  $stdout.puts
  $stdout.puts "done."
end

#message(msg) ⇒ Object



249
250
251
# File 'lib/xplenty/kensa/client.rb', line 249

def message(msg)
  $stdout.print msg
end

#result(status) ⇒ Object



244
245
246
247
# File 'lib/xplenty/kensa/client.rb', line 244

def result(status)
  msg = status ? green("[PASS]") : red(bold("[FAIL]"))
  $stdout.print " #{msg}"
end

#test(msg) ⇒ Object



229
230
231
232
233
# File 'lib/xplenty/kensa/client.rb', line 229

def test(msg)
  $stdout.puts
  $stdout.puts
  $stdout.print "Testing #{msg}"
end