class Rainbow::Wrapper
Attributes
enabled[RW]
Public Class Methods
new(enabled = true)
click to toggle source
# File lib/rainbow/wrapper.rb, line 9 def initialize(enabled = true) @enabled = enabled end
Public Instance Methods
wrap(string)
click to toggle source
# File lib/rainbow/wrapper.rb, line 13 def wrap(string) if enabled Presenter.new(string.to_s) else NullPresenter.new(string.to_s) end end