Skip to content

Commit 972521e

Browse files
committed
rubocop
1 parent 377c918 commit 972521e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/bashly/concerns/validation_helpers.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def assert_array(key, value, of: nil)
3838
def assert_hash(key, value, keys: nil)
3939
assert value.is_a?(Hash), "#{key} must be a hash"
4040

41-
if keys
42-
invalid_keys = value.keys.map(&:to_sym) - keys
43-
assert invalid_keys.empty?, "#{key} contains invalid options: #{invalid_keys.join ', '}"
44-
end
41+
return unless keys
42+
43+
invalid_keys = value.keys.map(&:to_sym) - keys
44+
assert invalid_keys.empty?, "#{key} contains invalid options: #{invalid_keys.join ', '}"
4545
end
4646

4747
def assert_uniq(key, value, array_keys)

lib/bashly/config_validator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def assert_dependencies_hash(key, value)
6666
def assert_dependency(key, value)
6767
assert [String, Hash].include?(value.class),
6868
"#{key} must be a string or a hash"
69-
69+
7070
return if value.is_a? String
7171

7272
assert_hash key, value, keys: Script::Dependency.option_keys

0 commit comments

Comments
 (0)