Parent

Methods

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
    Rainbow::Presenter.new(string.to_s)
  else
    Rainbow::NullPresenter.new(string.to_s)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.