File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,6 @@ def parse
20
20
self
21
21
end
22
22
23
- # :reek:NilCheck
24
- def output_stream
25
- output_filename = @argv_options . output_filename
26
- output_filename . nil? ? $stdout : File . open ( output_filename , "w" )
27
- end
28
-
29
23
# :reek:NilCheck
30
24
def to_h
31
25
file_hash = file_options . to_h
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class Options
9
9
# Extends RubyCritic::Cli::Options::Argv to parse a subset of the
10
10
# parameters accepted by RubyCritic
11
11
class Argv < RubyCritic ::Cli ::Options ::Argv
12
- attr_reader :output_filename
12
+ attr_accessor :output_filename
13
13
14
14
def parse # rubocop:disable Metrics/MethodLength
15
15
parser . new do |opts |
@@ -22,7 +22,7 @@ def parse # rubocop:disable Metrics/MethodLength
22
22
end
23
23
24
24
opts . on ( "-o" , "--out FILE" , "Output report to file" ) do |filename |
25
- @ output_filename = filename
25
+ self . output_filename = filename
26
26
end
27
27
28
28
opts . on_tail ( "-v" , "--version" , "Show gem's version" ) do
@@ -34,6 +34,10 @@ def parse # rubocop:disable Metrics/MethodLength
34
34
end
35
35
end . parse! ( @argv )
36
36
end
37
+
38
+ def to_h
39
+ super . merge ( { output_filename : output_filename } )
40
+ end
37
41
end
38
42
end
39
43
end
You can’t perform that action at this time.
0 commit comments