global

def all_methods(obj, instance_methods=false)

Get all the methods that we'll want to output
def all_methods(obj, instance_methods=false)
  methods = if instance_methods || opts.present?(:'instance-methods')
              Pry::Method.all_from_class(obj)
            else
              Pry::Method.all_from_obj(obj)
            end
  if jruby? && !opts.present?(:J)
    methods = trim_jruby_aliases(methods)
  end
  methods.select{ |method| opts.present?(:ppp) || method.visibility == :public }
end