Class: Hipbot::Adapters::Telnet::Connection

Inherits:
EM::Connection
  • Object
show all
Includes:
Cache
Defined in:
lib/hipbot/adapters/telnet.rb

Instance Method Summary collapse

Methods included from Cache

#_cache

Constructor Details

#initialize(adapter) ⇒ Connection

Returns a new instance of Connection.



19
20
21
# File 'lib/hipbot/adapters/telnet.rb', line 19

def initialize adapter
  adapter.connection = self
end

Instance Method Details

#receive_data(data) ⇒ Object



27
28
29
30
# File 'lib/hipbot/adapters/telnet.rb', line 27

def receive_data data
  message = data.strip
  Hipbot.react(user, nil, message)
end