Sha256: 6817bc1092db38382db30a67a5c618703e359f7cd13e538625b51884ed4b1082
Contents?: true
Size: 557 Bytes
Versions: 1
Compression:
Stored size: 557 Bytes
Contents
module RocketFuel module Precheck class CommandLineResultPresenter include Thor::Base SUCCESS_ICON = "\u2713".encode('utf-8') FAILURE_ICON = "\u00D7".encode('utf-8') def initialize(result) @result = result end def present print_wrapped(set_color([icon, @result.message].join(" "), color), :indent => 2) end protected def icon @result.ok? ? SUCCESS_ICON : FAILURE_ICON end def color @result.ok? ? :green : :red end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rocket_fuel-0.0.1 | lib/rocket_fuel/precheck/command_line_result_presenter.rb |