Module Clio
In: lib/clio/string.rb
lib/clio/commandable.rb
lib/clio/progressbar.rb
lib/clio/commandline.rb
lib/clio/errors.rb
lib/clio/usage/subcommand.rb
lib/clio/usage/parser.rb
lib/clio/usage/command.rb
lib/clio/usage/signature.rb
lib/clio/usage/interface.rb
lib/clio/usage/argument.rb
lib/clio/usage/option.rb
lib/clio/usage.rb
lib/clio/buffer.rb
lib/clio/consoleutils.rb
lib/clio/layout/table.rb
lib/clio/layout/split.rb
lib/clio/layout/line.rb
lib/clio/layout/list.rb
lib/clio/layout/stack.rb
lib/clio/layout.rb
lib/clio/ansicode.rb

ANSICode

Module which makes it very easy to use ANSI codes. These are esspecially nice for beautifying shell output.

  include ANSICode

  p red, "Hello", blue, "World"
  => "\e[31mHello\e[34mWorld"

  p red { "Hello" } + blue { "World" }
  => "\e[31mHello\e[0m\e[34mWorld\e[0m"

Supported ANSI Comands

The following is a list of supported codes.

    save
    restore
    clear_screen
    cls             # synonym for :clear_screen
    clear_line
    clr             # synonym for :clear_line
    move
    up
    down
    left
    right
    display

    clear
    reset           # synonym for :clear
    bold
    dark
    italic          # not widely implemented
    underline
    underscore      # synonym for :underline
    blink
    rapid_blink     # not widely implemented
    negative        # no reverse because of String#reverse
    concealed
    strikethrough   # not widely implemented

    black
    red
    green
    yellow
    blue
    magenta
    cyan
    white

    on_black
    on_red
    on_green
    on_yellow
    on_blue
    on_magenta
    on_cyan
    on_white

Methods

buffer   string  

Classes and Modules

Module Clio::ANSICode
Module Clio::Commandable
Module Clio::Terminal
Class Clio::Buffer
Class Clio::Commandline
Class Clio::Layout
Class Clio::NoCommandError
Class Clio::NoOptionError
Class Clio::Progressbar
Class Clio::String

Public Class methods

[Source]

# File lib/clio/buffer.rb, line 11
  def self.buffer
    Buffer.new
  end

[Source]

# File lib/clio/string.rb, line 7
  def self.string(str)
    String.new(str)
  end

[Validate]