Class: Messed::Util::RemoteStatus::StatusHandler
- Inherits:
-
EM::Connection
- Object
- EM::Connection
- Messed::Util::RemoteStatus::StatusHandler
- Defined in:
- lib/messed/util/remote_status.rb
Instance Attribute Summary collapse
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
Instance Attribute Details
#status ⇒ Object
Returns the value of attribute status.
9 10 11 |
# File 'lib/messed/util/remote_status.rb', line 9 def status @status end |
Instance Method Details
#post_init ⇒ Object
11 12 13 14 |
# File 'lib/messed/util/remote_status.rb', line 11 def post_init puts "post..." send_data "status\r\n" end |
#receive_data(data) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/messed/util/remote_status.rb', line 16 def receive_data(data) JSON.parse(data).each do |key, value| self.status[key] = status end EM.stop_event_loop end |