Module: ShellCharacters

Included in:
Weather
Defined in:
lib/bbc/shell/characters.rb

Overview

Easy output of characters in your terminal

www.utf8-chartable.de/unicode-utf8-table.pl

Class Method Summary collapse

Class Method Details

.degrees_cObject



40
41
42
# File 'lib/bbc/shell/characters.rb', line 40

def degrees_c
  "\xC2\xB0C"
end

.degrees_fObject



44
45
46
# File 'lib/bbc/shell/characters.rb', line 44

def degrees_f
  "\xC2\xB0F"
end

.eastObject



12
13
14
# File 'lib/bbc/shell/characters.rb', line 12

def east
  "\xe2\x86\x92"
end

.northObject



20
21
22
# File 'lib/bbc/shell/characters.rb', line 20

def north
  "\xe2\x86\x91"
end

.north_eastObject



28
29
30
# File 'lib/bbc/shell/characters.rb', line 28

def north_east
  "\xe2\x86\x97"
end

.north_westObject



24
25
26
# File 'lib/bbc/shell/characters.rb', line 24

def north_west
  "\xe2\x86\x96"
end

.southObject



16
17
18
# File 'lib/bbc/shell/characters.rb', line 16

def south
  "\xe2\x86\x93"
end

.south_eastObject



36
37
38
# File 'lib/bbc/shell/characters.rb', line 36

def south_east
  "\xe2\x86\x98"
end

.south_westObject



32
33
34
# File 'lib/bbc/shell/characters.rb', line 32

def south_west
  "\xe2\x86\x99"
end

.square_blockObject



48
49
50
# File 'lib/bbc/shell/characters.rb', line 48

def square_block
  "\xe2\x96\x88"
end

.symbol_for_compass(direction) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/bbc/shell/characters.rb', line 52

def symbol_for_compass(direction)
  case direction
  when 'N' then north
  when 'NNE' then north
  when 'NE' then north_east
  when 'ENE' then east
  when 'E' then east
  when 'ESE' then east
  when 'SE' then south_east
  when 'SSE' then south
  when 'S' then south
  when 'SSW' then south
  when 'SW' then south_west
  when 'WSW' then west
  when 'W' then west
  when 'WNW' then west
  when 'NW' then north_west
  when 'NNW' then north
  else north
  end
end

.westObject



8
9
10
# File 'lib/bbc/shell/characters.rb', line 8

def west
  "\xe2\x86\x90"
end