aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-21 14:30:09 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2014-04-21 14:30:09 -0700
commit211018e2f94c60fdf7a47b87cbcb07432f0fa25d (patch)
treee44d815bab8074e62dd27d411f9bbb47ea8f2228 /core
parented04bd3c0fff100f40ed45d300fcb152723226ef (diff)
downloaddinobot-211018e2f94c60fdf7a47b87cbcb07432f0fa25d.tar.gz
dinobot-211018e2f94c60fdf7a47b87cbcb07432f0fa25d.tar.xz
Clean up code.
Diffstat (limited to 'core')
-rw-r--r--core/messageinfo.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/messageinfo.rb b/core/messageinfo.rb
index 627ca90..c9a12c4 100644
--- a/core/messageinfo.rb
+++ b/core/messageinfo.rb
@@ -11,8 +11,6 @@ module Dinobot
end
def respond(arr)
- raise "response not array -- #{arr}" unless arr.is_a?(Array)
-
case arr.first
when :say
raise "wrong number of arguments -- #{arr}" unless arr.length == 3
@@ -24,6 +22,10 @@ module Dinobot
@response << arr
end
+
+ def response?
+ !@response.empty?
+ end
end
end
end