Sha256: 3d02ab3134872f87475bc1c5845801e56d152ab0e8186fc4f213f02a9635c861

Contents?: true

Size: 1.66 KB

Versions: 14

Compression:

Stored size: 1.66 KB

Contents

module Nucleon
module Mixin
#
# == Console colors
#
# The Nucleon::Mixin::Colors module extends a class or instance to include
# methods for wrapping strings in colored text markers.
#
# For usage and definition:
#
# - See Nucleon::Util::Console
#
module Colors

  # Return a given string wrapped in black text markers.
  #
  # See:
  # - Nucleon::Util::Console::black
  #
  def black(string)
    ::Nucleon::Util::Console.black(string)
  end

  # Return a given string wrapped in red text markers.
  #
  # See:
  # - Nucleon::Util::Console::red
  #
  def red(string)
    ::Nucleon::Util::Console.red(string)
  end

  # Return a given string wrapped in green text markers.
  #
  # See:
  # - Nucleon::Util::Console::green
  #
  def green(string)
    ::Nucleon::Util::Console.green(string)
  end

  # Return a given string wrapped in yellow text markers.
  #
  # See:
  # - Nucleon::Util::Console::yellow
  #
  def yellow(string)
    ::Nucleon::Util::Console.yellow(string)
  end

  # Return a given string wrapped in blue text markers.
  #
  # See:
  # - Nucleon::Util::Console::blue
  #
  def blue(string)
    ::Nucleon::Util::Console.blue(string)
  end

  # Return a given string wrapped in purple text markers.
  #
  # See:
  # - Nucleon::Util::Console::purple
  #
  def purple(string)
    ::Nucleon::Util::Console.purple(string)
  end

  # Return a given string wrapped in cyan text markers.
  #
  # See:
  # - Nucleon::Util::Console::cyan
  #
  def cyan(string)
    ::Nucleon::Util::Console.cyan(string)
  end

  # Return a given string wrapped in grey text markers.
  #
  # See:
  # - Nucleon::Util::Console::grey
  #
  def grey(string)
    ::Nucleon::Util::Console.grey(string)
  end
end
end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
nucleon-0.2.16 lib/core/mixin/colors.rb
nucleon-0.2.15 lib/core/mixin/colors.rb
nucleon-0.2.14 lib/core/mixin/colors.rb
nucleon-0.2.13 lib/core/mixin/colors.rb
nucleon-0.2.12 lib/core/mixin/colors.rb
nucleon-0.2.11 lib/core/mixin/colors.rb
nucleon-0.2.10 lib/core/mixin/colors.rb
nucleon-0.2.9 lib/core/mixin/colors.rb
nucleon-0.2.8 lib/core/mixin/colors.rb
nucleon-0.2.7 lib/core/mixin/colors.rb
nucleon-0.2.6 lib/core/mixin/colors.rb
nucleon-0.2.5 lib/core/mixin/colors.rb
nucleon-0.2.4 lib/core/mixin/colors.rb
nucleon-0.2.3 lib/core/mixin/colors.rb