vendor/jruby/1.9/gems/rubocop-0.25.0/lib/rubocop/cop/mixin/on_method.rb
# Returns true for constructs such as
# private def my_method
# which are allowed in Ruby 2.1 and later.
Returns true for constructs such as
private def my_method
which are allowed in Ruby 2.1 and later.
Returns true for constructs such as private def my_method which are allowed in Ruby 2 . 1 and later .
def visibility_and_def_on_same_line?(receiver, method_name, args)
        !receiver &&
          [:public, :protected, :private,
           :module_function].include?(method_name) &&
          args.size == 1 && [:def, :defs].include?(args.first.type)
      end
def visibility_and_def_on_same_line? ( receiver , method_name , args ) ! receiver && [ :public , :protected , :private , :module_function ] . include? ( method_name ) && args . size == 1 && [ :def , :defs ] . include? ( args . first . type ) end
Returns true for constructs such as
private def my_method
which are allowed in Ruby 2.1 and later.
Returns true for constructs such as private def my_method which are allowed in Ruby 2 . 1 and later .
receiver
method_name
args