Blank Function in Ruby


class Client
  # @return [Boolean]
  def credentials?
    credentials.values.none? { |v| blank?(v) }
  end

  private

    def blank?(s)
      s.respond_to?(:empty?) ? s.empty? : !s
    end

end