diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 14:30:09 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-04-21 14:30:09 -0700 |
commit | 211018e2f94c60fdf7a47b87cbcb07432f0fa25d (patch) | |
tree | e44d815bab8074e62dd27d411f9bbb47ea8f2228 /core/messageinfo.rb | |
parent | ed04bd3c0fff100f40ed45d300fcb152723226ef (diff) | |
download | dinobot-211018e2f94c60fdf7a47b87cbcb07432f0fa25d.tar.gz dinobot-211018e2f94c60fdf7a47b87cbcb07432f0fa25d.tar.xz |
Clean up code.
Diffstat (limited to 'core/messageinfo.rb')
-rw-r--r-- | core/messageinfo.rb | 6 |
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 |