struct Colorize::Object(T)

Defined in:

colorize.cr

Constructors

Instance Method Summary

Instance methods inherited from struct Struct

==(other) : Bool ==, hash(hasher) hash, inspect(io : IO) : Nil inspect, pretty_print(pp) : Nil pretty_print, to_s(io : IO) : Nil to_s

Instance methods inherited from struct Value

==(other : JSON::Any)
==(other : YAML::Any)
==(other)
==
, dup dup

Instance methods inherited from class Object

! : Bool !, !=(other) !=, !~(other) !~, ==(other) ==, ===(other : JSON::Any)
===(other : YAML::Any)
===(other)
===
, =~(other) =~, as(type : Class) as, as?(type : Class) as?, class class, dup dup, hash
hash(hasher)
hash
, inspect(io : IO) : Nil
inspect : String
inspect
, is_a?(type : Class) : Bool is_a?, itself itself, nil? : Bool nil?, not_nil! not_nil!, pretty_inspect(width = 79, newline = "\n", indent = 0) : String pretty_inspect, pretty_print(pp : PrettyPrint) : Nil pretty_print, responds_to?(name : Symbol) : Bool responds_to?, tap(&) tap, to_json(io : IO)
to_json
to_json
, to_pretty_json(indent : String = " ")
to_pretty_json(io : IO, indent : String = " ")
to_pretty_json
, to_s : String
to_s(io : IO) : Nil
to_s
, to_yaml(io : IO)
to_yaml
to_yaml
, try(&) try, unsafe_as(type : T.class) forall T unsafe_as

Constructor methods inherited from class Object

from_json(string_or_io, root : String) : self
from_json(string_or_io) : self
from_json
, from_yaml(string_or_io : String | IO) : self from_yaml

Constructor Detail

def self.new(object : T) #

[View source]

Instance Method Detail

def back(color : Symbol) #

[View source]
def back(back : Color) #

[View source]
def black #

[View source]
def blink #

[View source]
def blue #

[View source]
def bold #

[View source]
def bright #

[View source]
def cyan #

[View source]
def dark_gray #

[View source]
def default #

[View source]
def dim #

[View source]
def fore(color : Symbol) #

[View source]
def fore(fore : Color) #

[View source]
def green #

[View source]
def hidden #

[View source]
def inspect(io : IO) : Nil #
Description copied from struct Struct

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]
def light_blue #

[View source]
def light_cyan #

[View source]
def light_gray #

[View source]
def light_green #

[View source]
def light_magenta #

[View source]
def light_red #

[View source]
def light_yellow #

[View source]
def magenta #

[View source]
def mode(mode : Symbol) #

[View source]
def on(color : Symbol) #

[View source]
def on_black #

[View source]
def on_blue #

[View source]
def on_cyan #

[View source]
def on_dark_gray #

[View source]
def on_default #

[View source]
def on_green #

[View source]
def on_light_blue #

[View source]
def on_light_cyan #

[View source]
def on_light_gray #

[View source]
def on_light_green #

[View source]
def on_light_magenta #

[View source]
def on_light_red #

[View source]
def on_light_yellow #

[View source]
def on_magenta #

[View source]
def on_red #

[View source]
def on_white #

[View source]
def on_yellow #

[View source]
def red #

[View source]
def reverse #

[View source]
def surround(io = STDOUT, &) #

[View source]
def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def toggle(flag) #

[View source]
def underline #

[View source]
def white #

[View source]
def yellow #

[View source]