Class: MKIt::MKItdClient
- Inherits:
-
Object
- Object
- MKIt::MKItdClient
- Defined in:
- lib/mkit/client/mkitd_client.rb
Instance Method Summary collapse
-
#initialize(request, server_url, my_id) ⇒ MKItdClient
constructor
A new instance of MKItdClient.
- #request(request, request_data) ⇒ Object
Constructor Details
#initialize(request, server_url, my_id) ⇒ MKItdClient
Returns a new instance of MKItdClient.
7 8 9 10 11 12 13 14 |
# File 'lib/mkit/client/mkitd_client.rb', line 7 def initialize(request, server_url, my_id) case request[:verb].to_sym when :ws, :ws_console @client = MKIt::WebSocketClient.new(server_url, my_id) else @client = MKIt::HttpClient.new(server_url, my_id) end end |
Instance Method Details
#request(request, request_data) ⇒ Object
16 17 18 19 20 |
# File 'lib/mkit/client/mkitd_client.rb', line 16 def request(request, request_data) # puts "Request: #{request}" # puts "Request data: #{request_data}" @client.request(request, request_data) end |