re: RuboCop: Bulk minor style corrections

This commit is contained in:
Alexey Dubovskoy
2016-06-20 20:55:44 +01:00
parent 32a3b53892
commit f15f6850de
15 changed files with 41 additions and 143 deletions

View File

@@ -125,10 +125,9 @@ module ActiveModel
self.root = instance_options[:root]
self.scope = instance_options[:scope]
scope_name = instance_options[:scope_name]
if scope_name && !respond_to?(scope_name)
define_singleton_method scope_name, lambda { scope }
end
return if !(scope_name = instance_options[:scope_name]) || respond_to?(scope_name)
define_singleton_method scope_name, -> { scope }
end
def success?