Class: Thor::AppClient::Server
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- Thor::AppClient::Server
- Defined in:
- lib/ThorClient.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(opts) ⇒ Server
constructor
A new instance of Server.
- #post_init ⇒ Object
- #receive_data(data) ⇒ Object
-
#stop ⇒ Object
Stops this connection.
- #unbind ⇒ Object
Constructor Details
#initialize(opts) ⇒ Server
Returns a new instance of Server.
46 47 48 |
# File 'lib/ThorClient.rb', line 46 def initialize(opts) @options = opts end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
44 45 46 |
# File 'lib/ThorClient.rb', line 44 def @options end |
#status ⇒ Object
Returns the value of attribute status.
44 45 46 |
# File 'lib/ThorClient.rb', line 44 def status @status end |
Instance Method Details
#post_init ⇒ Object
50 51 52 |
# File 'lib/ThorClient.rb', line 50 def post_init @options[:thor_client].em_post_init(self, ) end |
#receive_data(data) ⇒ Object
58 59 60 |
# File 'lib/ThorClient.rb', line 58 def receive_data(data) @options[:thor_client].em_receive(self, , status, data) end |
#stop ⇒ Object
Stops this connection
63 64 65 |
# File 'lib/ThorClient.rb', line 63 def stop puts "AppThorClient::Server::stop() - Not implemented!" end |
#unbind ⇒ Object
54 55 56 |
# File 'lib/ThorClient.rb', line 54 def unbind @options[:thor_client].em_unbind(self, ) end |