Class: Ruboclean::Runner::Options::Input

Inherits:
Object
  • Object
show all
Defined in:
lib/ruboclean/runner/options/input.rb

Overview

Determines the input stream

Instance Method Summary collapse

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_pathObject



16
17
18
# File 'lib/ruboclean/runner/options/input.rb', line 16

def input_path
  @input_path ||= find_input_path
end

#stdin?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/ruboclean/runner/options/input.rb', line 20

def stdin?
  cli_arguments.stdin?
end

#streamObject



12
13
14
# File 'lib/ruboclean/runner/options/input.rb', line 12

def stream
  @stream ||= determine_input_stream
end