lib/rexpense/resources/resource_base.rb
Unused block argument - response
. You can omit the argument if you don't care about it. Open
Open
http.delete("#{endpoint_base}/#{id}", body: {}) do |response|
- Read upRead up
- Exclude checks
This cop checks for unused block arguments.
Example:
# bad
do_something do |used, unused|
puts used
end
do_something do |bar|
puts :foo
end
define_method(:foo) do |bar|
puts :baz
end
Example:
#good
do_something do |used, _unused|
puts used
end
do_something do
puts :foo
end
define_method(:foo) do |_bar|
puts :baz
end
Prefer to_s
over string interpolation. Open
Open
http.post("#{endpoint_base}", body: params) do |response|
- Read upRead up
- Exclude checks
This cop checks for strings that are just an interpolated expression.
Example:
# bad
"#{@var}"
# good
@var.to_s
# good if @var is already a String
@var