Module: ShellCharacters
- Included in:
- Weather
- Defined in:
- lib/bbc/shell/characters.rb
Overview
Easy output of characters in your terminal
Class Method Summary collapse
- .degrees_c ⇒ Object
- .degrees_f ⇒ Object
- .east ⇒ Object
- .north ⇒ Object
- .north_east ⇒ Object
- .north_west ⇒ Object
- .south ⇒ Object
- .south_east ⇒ Object
- .south_west ⇒ Object
- .square_block ⇒ Object
- .symbol_for_compass(direction) ⇒ Object
- .west ⇒ Object
Class Method Details
.degrees_c ⇒ Object
40 41 42 |
# File 'lib/bbc/shell/characters.rb', line 40 def degrees_c "\xC2\xB0C" end |
.degrees_f ⇒ Object
44 45 46 |
# File 'lib/bbc/shell/characters.rb', line 44 def degrees_f "\xC2\xB0F" end |
.east ⇒ Object
12 13 14 |
# File 'lib/bbc/shell/characters.rb', line 12 def east "\xe2\x86\x92" end |
.north ⇒ Object
20 21 22 |
# File 'lib/bbc/shell/characters.rb', line 20 def north "\xe2\x86\x91" end |
.north_east ⇒ Object
28 29 30 |
# File 'lib/bbc/shell/characters.rb', line 28 def north_east "\xe2\x86\x97" end |
.north_west ⇒ Object
24 25 26 |
# File 'lib/bbc/shell/characters.rb', line 24 def north_west "\xe2\x86\x96" end |
.south ⇒ Object
16 17 18 |
# File 'lib/bbc/shell/characters.rb', line 16 def south "\xe2\x86\x93" end |
.south_east ⇒ Object
36 37 38 |
# File 'lib/bbc/shell/characters.rb', line 36 def south_east "\xe2\x86\x98" end |
.south_west ⇒ Object
32 33 34 |
# File 'lib/bbc/shell/characters.rb', line 32 def south_west "\xe2\x86\x99" end |
.square_block ⇒ Object
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 |
.west ⇒ Object
8 9 10 |
# File 'lib/bbc/shell/characters.rb', line 8 def west "\xe2\x86\x90" end |