Class: Whatever

Inherits:
Object
  • Object
show all
Defined in:
lib/whatever.rb,
lib/whatever/version.rb

Constant Summary collapse

RESPONSES =
[
  "Are you talking to me?",
  "Piss off!",
  "Man, whatever.",
  "Yeah, whatever.",
  "Get lost!"
].freeze
VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.method_missing(meth, *args, &block) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/whatever.rb', line 12

def self.method_missing(meth, *args, &block)
  if RESPONSES.respond_to? :sample
    RESPONSES.sample
  elsif RESPONSES.respond_to? :choice
    RESPONSES.choice
  else
    RESPONSES.first
  end
end