Class: Daps::Client
- Inherits:
-
Object
- Object
- Daps::Client
- Defined in:
- lib/daps/client.rb
Instance Method Summary collapse
-
#initialize(dir, remote, token, port) ⇒ Client
constructor
A new instance of Client.
- #start! ⇒ Object
Constructor Details
#initialize(dir, remote, token, port) ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/daps/client.rb', line 5 def initialize(dir, remote, token, port) @dir, @remote, @token, @port = File.(dir), remote, token, port end |
Instance Method Details
#start! ⇒ Object
9 10 11 12 13 14 |
# File 'lib/daps/client.rb', line 9 def start! FileUtils.mkdir_p(@dir) system(%{ curl http://#{@remote}:#{@port}/#{@token} | tar --directory=#{@dir} -xzf - }) end |