Skip to content

Commit 9a692ca

Browse files
committed
rubocop
1 parent f2d6276 commit 9a692ca

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/bashly/config_validator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def assert_command(key, value)
232232
"#{key}.args cannot contain a repeatable arg unless it is the last one"
233233
end
234234

235-
required_order = value['args'].map { |x| !!x['required'] }
235+
required_order = value['args'].map { |x| x['required'] ? true : false }
236236
refute required_order.include_sequence?(false, true),
237237
"#{key}.args cannot contain required arg after optional arg"
238238
end

lib/bashly/extensions/array.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def nonuniq
1616

1717
def include_sequence?(*elements)
1818
return false if elements.empty?
19-
each_cons(elements.size).any? { |subarray| subarray == elements }
19+
20+
each_cons(elements.size).any?(elements)
2021
end
2122
end

0 commit comments

Comments
 (0)