mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
make a one-liner per miah
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
b92537aff5
commit
5369b7ac79
1 changed files with 1 additions and 10 deletions
|
@ -113,16 +113,7 @@ module Inspec::Fetcher
|
|||
end
|
||||
|
||||
def update_from_opts(opts)
|
||||
changed = false
|
||||
%i{
|
||||
branch
|
||||
tag
|
||||
ref
|
||||
}.each do |opt_name|
|
||||
opt_changed = update_ivar_from_opt(opt_name, opts)
|
||||
changed ||= opt_changed
|
||||
end
|
||||
changed
|
||||
%i{branch tag ref}.map { |opt_name| update_ivar_from_opt(opt_name, opts) }.any?
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Reference in a new issue