Module: Mutter

Defined in:
lib/mutter.rb,
lib/mutter/indenter.rb,
lib/mutter/mutterer.rb

Defined Under Namespace

Classes: Indenter, Mutterer

Constant Summary collapse

ANSI =

ANSI color & transform codes

If the value's an array, 
[0] is the start code
and [1] is the end code.

Colors all have the same
reset code (39).
{
  :reset => 0,
  :transforms => {
    :bold      => [1, 22],
    :underline => [4, 24],
    :blink     => [5, 25],
    :inverse   => [7, 27]
  },
  :colors => {
    :black  => 30, :red    => 31,
    :green  => 32, :yellow => 33,
    :blue   => 34, :purple => 35,
    :cyan   => 36, :white  => 37,
    :reset  => 39
  }
}

Class Method Summary collapse

Class Method Details

.indenter(tab) ⇒ Object



41
42
43
# File 'lib/mutter.rb', line 41

def self.indenter tab
  Indenter.new tab
end

.new(*args) ⇒ Object



53
54
55
# File 'lib/mutter.rb', line 53

def self.new *args
  Mutterer.new(*args)
end

.say(*args) ⇒ Object



45
46
47
# File 'lib/mutter.rb', line 45

def self.say *args
  new.say *args
end

.stylize(*args) ⇒ Object



49
50
51
# File 'lib/mutter.rb', line 49

def self.stylize *args
  new.stylize *args
end