Skip to content

Commit 5564b6f

Browse files
manucabronzdoc
authored andcommitted
add small refactors
1 parent 59f407c commit 5564b6f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/skunk/cli/options.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ def parse
2020
self
2121
end
2222

23+
# :reek:NilCheck
2324
def output_stream
24-
@argv_options.output_filename.nil? ? $stdout : File.open(@argv_options.output_filename, "w")
25+
output_filename = @argv_options.output_filename
26+
output_filename.nil? ? $stdout : File.open(output_filename, "w")
2527
end
2628

2729
# :reek:NilCheck

lib/skunk/cli/options/argv.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Options
99
# Extends RubyCritic::Cli::Options::Argv to parse a subset of the
1010
# parameters accepted by RubyCritic
1111
class Argv < RubyCritic::Cli::Options::Argv
12-
attr_accessor :output_filename
12+
attr_reader :output_filename
1313

1414
def initialize(argv)
1515
super

0 commit comments

Comments
 (0)