Class: RocketFuel::Precheck::CommandLineResultPresenter

Inherits:
Object
  • Object
show all
Includes:
Thor::Base
Defined in:
lib/rocket_fuel/precheck/command_line_result_presenter.rb

Constant Summary collapse

SUCCESS_ICON =
"\u2713".encode('utf-8')
FAILURE_ICON =
"\u00D7".encode('utf-8')

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ CommandLineResultPresenter

Returns a new instance of CommandLineResultPresenter.



9
10
11
# File 'lib/rocket_fuel/precheck/command_line_result_presenter.rb', line 9

def initialize(result)
  @result = result
end

Instance Method Details

#presentObject



13
14
15
16
# File 'lib/rocket_fuel/precheck/command_line_result_presenter.rb', line 13

def present
  print_wrapped(set_color([icon, @result.message].join(" "), color),
    :indent => 2)
end