Class: RokuBuilder::Linker
Overview
Launch application, sending parameters
Instance Method Summary collapse
-
#link(options:) ⇒ Object
Deeplink to the currently sideloaded app.
Methods inherited from Util
#init, #initialize, #multipart_connection, options_parse, #simple_connection
Constructor Details
This class inherits a constructor from RokuBuilder::Util
Instance Method Details
#link(options:) ⇒ Object
Note:
Options string should be formated like the following: “<key>:<value>[, <key>:<value>]*”
Note:
Any options will be accepted and sent to the app
Deeplink to the currently sideloaded app
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/roku_builder/linker.rb', line 9 def link(options:) path = "/launch/dev" return false unless payload = Util.(options: ) unless payload.keys.count > 0 return false end path = "#{path}?#{parameterize(payload)}" conn = multipart_connection(port: 8060) response = conn.post path return response.success? end |