Module: Gallows

Defined in:
lib/gallows.rb

Overview

Module to hold Gallow graphics

Constant Summary collapse

GALLOWS =
{ 0 => start,
  1 => head,
  2 => body,
  3 => right_arm,
  4 => left_arm,
  5 => right_leg,
  6 => finish }
.freeze

Class Method Summary collapse

Class Method Details

.bodyObject



29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gallows.rb', line 29

def self.body
  <<-GALLOWS
  ===========
    |/    |
    |     O
    |     |
    |
    |\\
  ============
  GALLOWS
end

.finishObject



77
78
79
80
81
82
83
84
85
86
87
# File 'lib/gallows.rb', line 77

def self.finish
  <<-GALLOWS
  ===========
    |/    |
    |     O
    |    /|\\
    |    / \\
    |\\
  ============
  GALLOWS
end

.headObject



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/gallows.rb', line 17

def self.head
  <<-GALLOWS
  ===========
    |/    |
    |     O
    |
    |
    |\\
  ============
  GALLOWS
end

.left_armObject



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/gallows.rb', line 53

def self.left_arm
  <<-GALLOWS
  ===========
    |/    |
    |     O
    |    /|\\
    |
    |\\
  ============
  GALLOWS
end

.right_armObject



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/gallows.rb', line 41

def self.right_arm
  <<-GALLOWS
  ===========
    |/    |
    |     O
    |    /|
    |
    |\\
  ============
  GALLOWS
end

.right_legObject



65
66
67
68
69
70
71
72
73
74
75
# File 'lib/gallows.rb', line 65

def self.right_leg
  <<-GALLOWS
  ===========
    |/    |
    |     O
    |    /|\\
    |    /
    |\\
  ============
  GALLOWS
end

.startObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/gallows.rb', line 5

def self.start
  <<-GALLOWS
  ===========
    |/    |
    |
    |
    |
    |\\
  ============
  GALLOWS
end