Module: Msg

Defined in:
lib/spior/msg.rb

Overview

Used to display various message

Class Method Summary collapse

Class Method Details



9
10
11
12
13
14
15
16
# File 'lib/spior/msg.rb', line 9

def banner
  puts
  puts '┏━┓┏━┓╻┏━┓┏━┓'
  puts '┗━┓┣━┛┃┃ ┃┣┳┛'
  puts '┗━┛╹  ╹┗━┛╹┗╸'
  puts
  # generated with toilet -F crop -f future spior
end

.err(text) ⇒ Object



29
30
31
32
33
34
# File 'lib/spior/msg.rb', line 29

def err(text)
  opn = Rainbow('[').red
  msg = Rainbow('-').white
  cls = Rainbow(']').red
  puts "#{opn}#{msg}#{cls} #{text}"
end

.headObject



18
19
20
# File 'lib/spior/msg.rb', line 18

def head
  puts Rainbow('------------------------------------------------').cyan
end

.info(text) ⇒ Object



36
37
38
39
40
41
# File 'lib/spior/msg.rb', line 36

def info(text)
  one = Rainbow('_').blue
  two = Rainbow('-').white
  thr = Rainbow('_').blue
  puts "#{one}#{two}#{thr} #{text} #{one}#{two}#{thr}"
end

.p(text) ⇒ Object



22
23
24
25
26
27
# File 'lib/spior/msg.rb', line 22

def p(text)
  opn = Rainbow('[').cyan
  msg = Rainbow('+').white
  cls = Rainbow(']').cyan
  puts "#{opn}#{msg}#{cls} #{text}"
end

.report(text) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/spior/msg.rb', line 43

def report(text)
  puts
  info text
  puts 'Please, report this issue at https://github.com/szorfein/spior/issues'
  puts
  exit 1
end