Class: Cheerup::Cli

Inherits:
Thor
  • Object
show all
Defined in:
lib/cheerup.rb

Instance Method Summary collapse

Instance Method Details

#up(name = nil) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/cheerup.rb', line 11

def up(name = nil)
  phrases = [
    "My heart bleeds for you",
    "No one cares",
    "Get over yourself",
    "I'm playing the world's saddest song on the world's tiniest violin, just for you",
    "Everything's gonna be alright",
    "Cry me a river",
    "Oh dearie me",
    "It might never happen",
    "As a wise fish once said, don't worry be happy",
    "Calm down, calm down",
    "Always look on the bright side of life"
  ]

  cheer_up = "#{phrases.sample} #{name}".strip
  system("say \"#{cheer_up}\"") if osx?
  puts "#{cheer_up}"
end