Sha256: fd2df34d8e99c350c420ea1e007a1babcfb00356db7f4e3f3a95ea58dc1b20e2

Contents?: true

Size: 789 Bytes

Versions: 3

Compression:

Stored size: 789 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift('./lib')

require 'bundler/setup'
require 'cmessages'

test = Cmessages.new

test.error('This is an error')
test.warning('This is a warning')
test.success('This is a success')
test.info('This is a message')

'This is an error'.error
'This is a warning'.warning
'This is a success'.success
'This is a message'.info

'This is a customised error'.error(:error_colour => :magenta, :error_prefix => '[ Custom Error ]')
'This is a customised error with no prefix'.error(:error_colour => :blue, :use_prefixes => false)
'This is a customised error with no prefix or colour'.error(:use_colours => false, :use_prefixes => false)

'This is a customised error with an invalid colour'.error(:error_colour => :invalid_colour, :error_prefix => '[ Custom Error ]')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cmessages-1.0.1 examples/examples.rb
cmessages-1.0.0 examples/examples.rb
cmessages-0.1.0 examples/examples.rb