Sha256: 507bddb1a0050b14422c67f8daff3750baf4d5a92a0d6deacdc10cd2aa4950b7
Contents?: true
Size: 345 Bytes
Versions: 13
Compression:
Stored size: 345 Bytes
Contents
require_relative 'presenter' require_relative 'null_presenter' module Rainbow class Wrapper attr_accessor :enabled def initialize(enabled = true) @enabled = enabled end def wrap(string) if enabled Presenter.new(string.to_s) else NullPresenter.new(string.to_s) end end end end
Version data entries
13 entries across 13 versions & 4 rubygems