Class: Ruboclean::Runner::Options::Input
- Inherits:
-
Object
- Object
- Ruboclean::Runner::Options::Input
- Defined in:
- lib/ruboclean/runner/options/input.rb
Overview
Determines the input stream
Instance Method Summary collapse
-
#initialize(cli_arguments:) ⇒ Input
constructor
A new instance of Input.
- #input_path ⇒ Object
- #stdin? ⇒ Boolean
- #stream ⇒ Object
Constructor Details
#initialize(cli_arguments:) ⇒ Input
Returns a new instance of Input.
8 9 10 |
# File 'lib/ruboclean/runner/options/input.rb', line 8 def initialize(cli_arguments:) @cli_arguments = cli_arguments end |
Instance Method Details
#input_path ⇒ Object
16 17 18 |
# File 'lib/ruboclean/runner/options/input.rb', line 16 def input_path @input_path ||= find_input_path end |
#stdin? ⇒ Boolean
20 21 22 |
# File 'lib/ruboclean/runner/options/input.rb', line 20 def stdin? cli_arguments.stdin? end |
#stream ⇒ Object
12 13 14 |
# File 'lib/ruboclean/runner/options/input.rb', line 12 def stream @stream ||= determine_input_stream end |