Showing 3 of 3 total issues
Method exchange_rate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.exchange_rate(sym = :USD, cache_result = true) @exchange_rates ||= exchange_rates if cache_result @exchange_rates = exchange_rates unless cache_result @exchange_rates.each_with_object({}) do |rates, result|
- Read upRead up
Use %i
or %I
for an array of symbols. Open
(constants - [:Bank, :ResponseError]).each_with_object({}) do |klass, rates|
- Read upRead up
- Exclude checks