Sha256: 9d71ba0ddf43ff98f22edc9534df1b86cb0b8a266117b336c57c781aa9a299fb
Contents?: true
Size: 361 Bytes
Versions: 5
Compression:
Stored size: 361 Bytes
Contents
require 'rainbow/presenter' require 'rainbow/null_presenter' module Rainbow class Wrapper attr_accessor :enabled def initialize(enabled = true) @enabled = enabled end def wrap(string) if enabled Rainbow::Presenter.new(string.to_s) else Rainbow::NullPresenter.new(string.to_s) end end end end
Version data entries
5 entries across 5 versions & 2 rubygems