GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Delivery.get()   A
last analyzed

Complexity

Conditions 4

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 4
c 1
b 0
f 0
dl 0
loc 18
ccs 11
cts 11
cp 1
crap 4
rs 9.2
1 1
module Textris
2 1
  module Delivery
3 1
    module_function
4
5 1
    def get
6 7
      methods = Rails.application.config.try(:textris_delivery_method)
7 7
      methods = [*methods].compact
8 7
      if methods.blank?
9 3
        if Rails.env.development?
10 1
          methods = [:log]
11 2
        elsif Rails.env.test?
12 1
          methods = [:test]
13
        else
14 1
          methods = [:mail]
15
        end
16
      end
17
18
      methods.map do |method|
19
        "Textris::Delivery::#{method.to_s.camelize}".safe_constantize ||
20 8
          "#{method.to_s.camelize}Delivery".safe_constantize
21 7
      end.compact
22
    end
23
  end
24
end
25