Class: Torba::Ui

Inherits:
Object
  • Object
show all
Defined in:
lib/torba/ui.rb

Overview

Thin wrapper around Thor::Shell.

Since:

  • 0.1.0

Instance Method Summary collapse

Constructor Details

#initializeUi

Returns a new instance of Ui

Since:

  • 0.1.0



6
7
8
# File 'lib/torba/ui.rb', line 6

def initialize
  @shell = Thor::Base.shell.new
end

Instance Method Details

#confirm(message) ⇒ Object

Since:

  • 0.1.0



14
15
16
# File 'lib/torba/ui.rb', line 14

def confirm(message)
  @shell.say(message, :green)
end

#error(message) ⇒ Object

Since:

  • 0.1.0



22
23
24
# File 'lib/torba/ui.rb', line 22

def error(message)
  @shell.say(message, :red)
end

#info(message) ⇒ Object

Since:

  • 0.1.0



10
11
12
# File 'lib/torba/ui.rb', line 10

def info(message)
  @shell.say(message)
end

#suggest(message) ⇒ Object

Since:

  • 0.1.0



18
19
20
# File 'lib/torba/ui.rb', line 18

def suggest(message)
  @shell.say(message, :yellow)
end