Class: Rainbow::Wrapper

### Home Classes Methods

### In Files

- lib/rainbow/wrapper.rb

### Parent

Object

### Methods

- ::new
- #wrap

### Class/Module Index

Quicksearch

- Rainbow
- Rainbow::Color
- Rainbow::Color::Indexed
- Rainbow::Color::Named
- Rainbow::Color::RGB
- Rainbow::Ext
- Rainbow::Ext::String
- Rainbow::Ext::String::InstanceMethods
- Rainbow::NullPresenter
- Rainbow::Presenter
- Rainbow::StringUtils
- Rainbow::Wrapper
- Sickill
- Sickill::Rainbow
- Object

No matching classes.

# 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.