From 211018e2f94c60fdf7a47b87cbcb07432f0fa25d Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 21 Apr 2014 14:30:09 -0700 Subject: Clean up code. --- core/messageinfo.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core') 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 -- cgit v1.2.3-70-g09d2