Class: Marvin::IRC::Client::EMConnection
- Inherits:
-
EventMachine::Protocols::LineAndTextProtocol
- Object
- EventMachine::Protocols::LineAndTextProtocol
- Marvin::IRC::Client::EMConnection
- Defined in:
- lib/marvin/irc/client.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#port ⇒ Object
Returns the value of attribute port.
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
-
#initialize(*args) ⇒ EMConnection
constructor
A new instance of EMConnection.
- #post_init ⇒ Object
- #receive_line(line) ⇒ Object
- #unbind ⇒ Object
Constructor Details
#initialize(*args) ⇒ EMConnection
Returns a new instance of EMConnection.
54 55 56 57 58 59 |
# File 'lib/marvin/irc/client.rb', line 54 def initialize(*args) opts = args. super(*args) self.client = Marvin::IRC::Client.new(opts) self.client.em_connection = self end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
52 53 54 |
# File 'lib/marvin/irc/client.rb', line 52 def client @client end |
#port ⇒ Object
Returns the value of attribute port.
52 53 54 |
# File 'lib/marvin/irc/client.rb', line 52 def port @port end |
#server ⇒ Object
Returns the value of attribute server.
52 53 54 |
# File 'lib/marvin/irc/client.rb', line 52 def server @server end |
Instance Method Details
#post_init ⇒ Object
61 62 63 64 |
# File 'lib/marvin/irc/client.rb', line 61 def post_init client.process_connect super end |
#receive_line(line) ⇒ Object
71 72 73 74 |
# File 'lib/marvin/irc/client.rb', line 71 def receive_line(line) Marvin::Logger.debug "<< #{line.strip}" self.client.receive_line(line) end |
#unbind ⇒ Object
66 67 68 69 |
# File 'lib/marvin/irc/client.rb', line 66 def unbind client.process_disconnect super end |