Class: Aspera::StandardInput

Inherits:
Object
  • Object
show all
Defined in:
lib/aspera/standard_input.rb

Overview

The standard input given where a command reads a file (e.g. a log file to analyze): the command reads it, as it would read the file. On command line: the argument -, or the extended value @stdin:stream. Unlike @stdin:, which reads the standard input when the value is evaluated, it is not read until the command reads it.

Constant Summary collapse

NAME =

Name of the standard input where a file name is expected, also in results and messages

'-'

Instance Method Summary collapse

Instance Method Details

#read ⇒ String

Returns the content of the standard input, in binary mode.

Returns:

  • (String) —

    the content of the standard input, in binary mode



18
# File 'lib/aspera/standard_input.rb', line 18

def read = $stdin.binmode.read

#to_s ⇒ String

Returns -, e.g. as the file name in results.

Returns:

  • (String) —

    -, e.g. as the file name in results



15
# File 'lib/aspera/standard_input.rb', line 15

def to_s = NAME