From 134b44a2367f37c89fd34c5ca733567804f44d35 Mon Sep 17 00:00:00 2001 From: Felix Freeman Date: Sun, 2 Jul 2023 15:59:10 -0400 Subject: [PATCH] Use explicit nesting Use explicit nesting, otherwise exceptions will not work, please check https://rubystyle.guide/#namespace-definition for more information. --- .rubocop.yml | 3 +++ lib/api_2captcha/client.rb | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e3462a7..be49624 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,5 +9,8 @@ Style/StringLiteralsInInterpolation: Enabled: true EnforcedStyle: double_quotes +Layout/IndentationWidth: + AllowedPatterns: ['^\s*module'] + Layout/LineLength: Max: 120 diff --git a/lib/api_2captcha/client.rb b/lib/api_2captcha/client.rb index c2b6c2a..98f022d 100644 --- a/lib/api_2captcha/client.rb +++ b/lib/api_2captcha/client.rb @@ -5,7 +5,8 @@ require 'base64' require 'open-uri' -class Api2Captcha::Client +module Api2Captcha +class Client DEFAULT_DOMAIN = "2captcha.com" BASE_URL_FORMAT = "https://%s" @@ -279,5 +280,4 @@ def make_res_request(request, action) end end end - - +end