Module: NameChangeOChart
- Defined in:
- lib/name_change_o_chart.rb,
lib/name_change_o_chart/version.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
- #convert(name) ⇒ Object
- #first_of_first(letter) ⇒ Object
- #first_of_last(letter) ⇒ Object
- #last_of_last(letter) ⇒ Object
Instance Method Details
#convert(name) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/name_change_o_chart.rb', line 4 def convert(name) parts = name.to_s.downcase.split start = parts.first.to_s ending = parts.last.to_s first = start[0] second = ending[0] third = ending[-1] %{#{first_of_first(first)} #{first_of_last(second)}#{last_of_last(third)}} end |
#first_of_first(letter) ⇒ Object
17 18 19 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 |
# File 'lib/name_change_o_chart.rb', line 17 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
46 47 48 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 |
# File 'lib/name_change_o_chart.rb', line 46 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
75 76 77 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 |
# File 'lib/name_change_o_chart.rb', line 75 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 |