struct

Term2::WithInput

Inherits Term2::ProgramOption < Struct < Value < Object

Configures a custom input source.

# Use a string as input for testing
input = IO::Memory.new("test input\n")
options = Term2::ProgramOptions.new(Term2::WithInput.new(input))

Constructors

new(input : IO)
Source

Instance methods

apply(program : Program) : Nil

Apply this option to a program instance.

Source