Module: Zget

Defined in:
lib/zget.rb,
lib/zget/errors.rb,
lib/zget/command.rb,
lib/zget/version.rb,
lib/zget/command/zget.rb,
lib/zget/command/zput.rb,
lib/zget/file_handler.rb

Defined Under Namespace

Classes: Command, FileHandler, Zget, Zput

Constant Summary collapse

InvalidFileError =
Class.new StandardError
InvalidPortError =
Class.new StandardError
VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.get(file_or_alias: nil, output: nil) ⇒ Object



17
18
19
# File 'lib/zget.rb', line 17

def self.get(file_or_alias: nil, output: nil)
  Zget.new(file_or_alias: file_or_alias, output: output).call
end

.put(_alias: SecureRandom.hex(2), bind_address: "0.0.0.0", file:, port: 6666) ⇒ Object



21
22
23
# File 'lib/zget.rb', line 21

def self.put(_alias: SecureRandom.hex(2), bind_address: "0.0.0.0", file:, port: 6666)
  Zput.new(_alias: _alias, bind_address: bind_address, file: file, port: port).call
end