Class: Julewire::Core::CLI::Tail
- Inherits:
-
Object
- Object
- Julewire::Core::CLI::Tail
- Includes:
- LineHelpers
- Defined in:
- lib/julewire/core/cli/tail.rb
Constant Summary collapse
- DEFAULT_MAX_VALUE_BYTES =
Serialization::TextEncoder::DEFAULT_MAX_VALUE_BYTES
- DEFAULT_POLL_INTERVAL =
0.1- FLAGS =
{ "--color" => [:color, true], "--no-color" => [:color, false], "--follow" => [:follow, true], "--once" => [:follow, false], "--plain" => %i[theme plain], "--punk" => %i[theme punk], "--skip-invalid" => %i[invalid skip], "--raw-invalid" => %i[invalid raw] }.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(argv:, stdin:, stdout:) ⇒ Tail
constructor
A new instance of Tail.
Constructor Details
#initialize(argv:, stdin:, stdout:) ⇒ Tail
Returns a new instance of Tail.
22 23 24 25 26 |
# File 'lib/julewire/core/cli/tail.rb', line 22 def initialize(argv:, stdin:, stdout:) @argv = argv @stdin = stdin @stdout = stdout end |
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 |
# File 'lib/julewire/core/cli/tail.rb', line 28 def call = renderer = tail_renderer() .fetch(:path) == "-" ? tail_stdin(, renderer) : tail_file(, renderer) 0 end |