File: colorized_string.rb

package info (click to toggle)
ruby-colorize 0.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144 kB
  • sloc: ruby: 290; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 465 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require File.expand_path('colorize/class_methods', File.dirname(__FILE__))
require File.expand_path('colorize/instance_methods', File.dirname(__FILE__))
#
# ColorizedString class extension.
#
class ColorizedString < String
  extend Colorize::ClassMethods
  include Colorize::InstanceMethods

  color_methods
  modes_methods

  #
  # Sortcut to create ColorizedString with ColorizedString['test'].
  #
  def self.[](string)
    ColorizedString.new(string)
  end
end