Sha256: 25377d851c059f61909da14dcd06d32d3593ec6f6a1a83b18bc0636c1a60169c

Contents?: true

Size: 692 Bytes

Versions: 30

Compression:

Stored size: 692 Bytes

Contents

class String
  def /(other)
    (Pathname.new(self) + other).to_s
  end
end

module ColorfulMessages
  
  # red
  def error(*messages)
    puts messages.map { |msg| "\033[1;31m#{msg}\033[0m" }
  end
  
  # yellow
  def warning(*messages)
    puts messages.map { |msg| "\033[1;33m#{msg}\033[0m" }
  end
  
  # green
  def success(*messages)
    puts messages.map { |msg| "\033[1;32m#{msg}\033[0m" }
  end
  
  alias_method :message, :success
  
  # magenta
  def note(*messages)
    puts messages.map { |msg| "\033[1;35m#{msg}\033[0m" }
  end
  
  # blue
  def info(*messages)
    puts messages.map { |msg| "\033[1;34m#{msg}\033[0m" }
  end
  
end

module ThorUI
  extend ColorfulMessages
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
adva-0.3.2 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.3.1 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.3.0 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.2.4 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.2.3 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.2.2 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.2.1 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.2.0 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.1.4 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.1.3 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.1.2 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.1.1 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.1.0 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
adva-0.0.1 test/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
merb-gen-1.0.15 lib/generators/templates/application/common/merb_thor/utils.rb
merb-gen-1.0.14 lib/generators/templates/application/common/merb_thor/utils.rb
merb-gen-1.0.13 lib/generators/templates/application/common/merb_thor/utils.rb
MARQ-0.0.1 merb/tasks/merb.thor/utils.rb
merb-gen-1.0.12 lib/generators/templates/application/common/merb_thor/utils.rb
integrity-0.1.9 vendor/webrat/spec/integration/merb/tasks/merb.thor/utils.rb