Sha256: 8cfe76c83eae7e1fbe441c716a1be7a27443f2eb0c5cec2b90ff48f5cdf4be6c

Contents?: true

Size: 643 Bytes

Versions: 1

Compression:

Stored size: 643 Bytes

Contents

module MadChatter
  
  module Actions
    
    class Base
  
      def initialize(message, user_token)
        @message = message
        @user_token = user_token
      end
  
      def process
        send_message(@message)
      end
  
      def username
        MadChatter::Users.username(@user_token)
      end
      
      def send_status(message)
        MadChatter::Server.send_status(message)
      end
      
      def send_action(message)
        MadChatter::Server.send_action(message)
      end
  
      def send_message(message)
        MadChatter::Server.send_message(username, message)
      end
      
    end
    
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mad_chatter-0.0.7 lib/mad_chatter/actions/base.rb