Sha256: c4316df265a2855c35cb72bf31eda4fc3c5a4518f57c27dd3074dd0b1426eab7

Contents?: true

Size: 678 Bytes

Versions: 60

Compression:

Stored size: 678 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

60 entries across 60 versions & 23 rubygems

Version Path
davidtrogers-webrat-0.4.4.2 spec/integration/merb/tasks/merb.thor/utils.rb
diabolo-webrat-0.4.4.1 spec/integration/merb/tasks/merb.thor/utils.rb
diabolo-webrat-0.4.4.2 spec/integration/merb/tasks/merb.thor/utils.rb
diabolo-webrat-0.4.4 spec/integration/merb/tasks/merb.thor/utils.rb
diabolo-webrat-0.5.1 spec/integration/merb/tasks/merb.thor/utils.rb
dstrelau-webrat-0.5.1 spec/integration/merb/tasks/merb.thor/utils.rb
emipair-webrat-0.0.1 spec/integration/merb/tasks/merb.thor/utils.rb
hardbap-webrat-0.5.1 spec/integration/merb/tasks/merb.thor/utils.rb
hardbap-webrat-0.5.2 spec/integration/merb/tasks/merb.thor/utils.rb
raldred-webrat-0.4.4.2 spec/integration/merb/tasks/merb.thor/utils.rb
sr-webrat-0.4.4.1 spec/integration/merb/tasks/merb.thor/utils.rb
winton-sum-0.1.0 vendor/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
winton-sum-0.1.1 vendor/webrat/spec/integration/merb/tasks/merb.thor/utils.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/webrat-0.7.3/spec/integration/merb/tasks/merb.thor/utils.rb
indirect-webrat-0.7.5 spec/integration/merb/tasks/merb.thor/utils.rb
indirect-webrat-0.7.4 spec/integration/merb/tasks/merb.thor/utils.rb
webrat-0.7.3 spec/integration/merb/tasks/merb.thor/utils.rb
jbd-webrat-0.7.2.rails3 spec/integration/merb/tasks/merb.thor/utils.rb
webrat-0.7.2 spec/integration/merb/tasks/merb.thor/utils.rb
webrat-0.7.2.beta.2 spec/integration/merb/tasks/merb.thor/utils.rb