Module: NameChangeOChart

Defined in:
lib/name_change_o_chart.rb,
lib/name_change_o_chart/version.rb

Constant Summary collapse

VERSION =
"0.0.2"

Class Method Summary collapse

Class Method Details

.convert(name) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/name_change_o_chart.rb', line 8

def convert(name)
  parts = name.to_s.downcase.split
  start = parts.first
  ending = parts.last
  
  first = start.first
  second = ending.first
  third = ending.last
  
  %{#{first_of_first(first)} #{first_of_last(second)}#{last_of_last(third)}}
end

.first_of_first(letter) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/name_change_o_chart.rb', line 20

def first_of_first(letter)
  {"a" => "Stinky",
  "b" => "Lumpy",
  "c" => "Buttercup",
  "d" => "Gidget",
  "e" => "Crusty",
  "f" => "Greasy",
  "g" => "Fluffy",
  "h" => "Cheeseball",
  "i" => "Chim-chim",
  "j" => "Poopsie",
  "k" => "Flunky",
  "l" => "Booger",
  "m" => "Pinky",
  "n" => "Zippy",
  "o" => "Goober",
  "p" => "Doofus",
  "q" => "Slimy",
  "r" => "Loopy",
  "s" => "Snotty",
  "t" => "Falafel",
  "u" => "Dorkey",
  "v" => "Squeezit",
  "w" => "Oprah",
  "x" => "Skipper",
  "y" => "Dinky",
  "z" => "Zsa-zsa"}.fetch(letter)
end

.first_of_last(letter) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/name_change_o_chart.rb', line 49

def first_of_last(letter)
  {"a" => "Diaper",
  "b" => "Toilet",
  "c" => "Giggle",
  "d" => "Bubble",
  "e" => "Girdle",
  "f" => "Barf",
  "g" => "Lizard",
  "h" => "Waffle",
  "i" => "Cootie",
  "j" => "Monkey",
  "k" => "Potty",
  "l" => "Liver",
  "m" => "Banana",
  "n" => "Rhino",
  "o" => "Burger",
  "p" => "Hamster",
  "q" => "Toad",
  "r" => "Gizzard",
  "s" => "Pizza",
  "t" => "Gerbil",
  "u" => "Chicken",
  "v" => "Pickle",
  "w" => "Chuckle",
  "x" => "Tofu",
  "y" => "Gorilla",
  "z" => "Stinker"}.fetch(letter)
end

.last_of_last(letter) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/name_change_o_chart.rb', line 78

def last_of_last(letter)
  {"a" => "head",
  "b" => "mouth",
  "c" => "face",
  "d" => "nose",
  "e" => "tush",
  "f" => "breath",
  "g" => "pants",
  "h" => "shorts",
  "i" => "lips",
  "j" => "honker",
  "k" => "butt",
  "l" => "brain",
  "m" => "tushie",
  "n" => "chunks",
  "o" => "hiney",
  "p" => "biscuits",
  "q" => "toes",
  "r" => "buns",
  "s" => "fanny",
  "t" => "sniffer",
  "u" => "sprinkles",
  "v" => "kisser",
  "w" => "squirt",
  "x" => "humperdinck",
  "y" => "brains",
  "z" => "juice"}.fetch(letter)
end