Skip to content

struct Colorize::Object(T)
inherits Struct

Class methods

.new(object : T)

View source

Methods

#back(color : Symbol)

View source

#back(back : Color)

View source

#black

View source
View source

#blue

View source

#bold

View source

#bright

View source

#cyan

View source

#dark_gray

View source

#default

View source

#fore(color : Symbol)

View source

#fore(fore : Color)

View source

#green

View source

#hidden

View source

#inspect(io : IO) : Nil

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
View source

#light_blue

View source

#light_cyan

View source

#light_gray

View source

#light_green

View source

#light_magenta

View source

#light_red

View source

#light_yellow

View source

#magenta

View source

#mode(mode : Symbol)

View source

#on(color : Symbol)

View source

#on_black

View source

#on_blue

View source

#on_cyan

View source

#on_dark_gray

View source

#on_default

View source

#on_green

View source

#on_light_blue

View source

#on_light_cyan

View source

#on_light_gray

View source

#on_light_green

View source

#on_light_magenta

View source

#on_light_red

View source

#on_light_yellow

View source

#on_magenta

View source

#on_red

View source

#on_white

View source

#on_yellow

View source

#reverse

View source

#surround(io = STDOUT

View source

#to_s(io : IO) : Nil

Same as #inspect(io).

View source

#toggle(flag)

View source

#underline

View source

#white

View source

#yellow

View source