forked from e621ng/e621ng
[Rubocop] Enforce consistent lambda notation
This commit is contained in:
parent
ded8993ba3
commit
26ced45f67
@ -125,6 +125,9 @@ Style/HashSyntax:
|
||||
Style/IfUnlessModifier:
|
||||
Enabled: false
|
||||
|
||||
Style/Lambda:
|
||||
EnforcedStyle: literal
|
||||
|
||||
Style/NumericPredicate:
|
||||
EnforcedStyle: comparison
|
||||
|
||||
|
@ -190,7 +190,7 @@ class ApplicationController < ActionController::Base
|
||||
return unless request.get? || request.head?
|
||||
params[:search] ||= ActionController::Parameters.new
|
||||
|
||||
deep_reject_blank = lambda do |hash|
|
||||
deep_reject_blank = ->(hash) do
|
||||
hash.reject { |k, v| v.blank? || (v.is_a?(Hash) && deep_reject_blank.call(v).blank?) }
|
||||
end
|
||||
if params[:search].is_a?(ActionController::Parameters)
|
||||
|
@ -49,7 +49,7 @@ module FileMethods
|
||||
return false if !is_image?
|
||||
|
||||
image = Vips::Image.new_from_file(file_path)
|
||||
fetch = lambda do |key|
|
||||
fetch = ->(key) do
|
||||
value = image.get(key)
|
||||
value.encode("ASCII", invalid: :replace, undef: :replace).gsub("\u0000", "")
|
||||
rescue Vips::Error
|
||||
|
Loading…
Reference in New Issue
Block a user