lib/rubocop/cop/style/braces_around_hash_parameters.rb
# Returns true if there's block inside the braces of the given hash arg
# and that block uses do..end. The reason for wanting to check this is
# that the do..end could bind to a different method invocation if the
# hash braces were removed.
Returns true if there's block inside the braces of the given hash arg
and that block uses do..end. The reason for wanting to check this is
that the do..end could bind to a different method invocation if the
hash braces were removed.
Returns true if there ' s block inside the braces of the given hash arg and that block uses do .. end . The reason for wanting to check this is that the do .. end could bind to a different method invocation if the hash braces were removed .
def braces_needed_for_semantics?(arg)
          arg.each_pair do |_key, value|
            return true if value.block_type? && !value.braces?
          end
          false
        end
def braces_needed_for_semantics? ( arg ) arg . each_pair do | _key , value | return true if value . block_type? && ! value . braces? end false end
Returns true if there's block inside the braces of the given hash arg
and that block uses do..end.
Returns true if there ' s block inside the braces of the given hash arg and that block uses do .. end .
arg