Skip to content

Commit 1eecfb6

Browse files
committed
refactor(cli): reduce FeatureEnvy by minimizing param references in parse_out_option
1 parent 7af41a4 commit 1eecfb6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/skunk/cli/options/argv.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ def to_h
4242
private
4343

4444
def parse_out_option(values)
45-
if values.all? { |val| Skunk::Config.supported_format?(val.to_sym) }
46-
Skunk::Config.formats = values.map(&:to_sym)
45+
formats_sym = values.map(&:to_sym)
46+
if formats_sym.all? { |fmt| Skunk::Config.supported_format?(fmt) }
47+
Skunk::Config.formats = formats_sym
4748
else
48-
self.output_filename = values.join(",")
49+
self.output_filename = formats_sym.join(",")
4950
end
5051
end
5152
end

0 commit comments

Comments
 (0)