Sha256: abc8d2ebd8866e92ebc29ef62679eab4c370ad7f9ed65b5861c47b5faede3809
Contents?: true
Size: 816 Bytes
Versions: 13
Compression:
Stored size: 816 Bytes
Contents
require 'highline' module Opsicle module Output def self.terminal HighLine.color_scheme = color_scheme @terminal ||= HighLine.new end def self.color_scheme @color_scheme ||= HighLine::ColorScheme.new( :normal => [], :error => [:bold, :red], :warning => [:bold, :yellow], :verbose => [:bold, :magenta], :debug => [:bold, :cyan], :success => [:bold, :green], ) end def self.say(msg, log_style=:normal) if $color terminal.say "<%= color('#{msg}', '#{log_style}') %>" else terminal.say msg end end def self.say_verbose(msg) terminal.say "<%= color('#{msg}', 'verbose') %>" if $verbose end def self.ask(*args) terminal.ask(*args) end end end
Version data entries
13 entries across 13 versions & 1 rubygems