File connection_string.rb
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
module AssLauncher
module Support
# Implement 1C connection string
# Mixin for connection string classes
# @note All connection string class have methods for get and set values
Method to_cmd
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def to_cmd
r = ''
args = to_args
args.each_with_index do |v, i|
next unless i.even?
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method to_args_private_proxy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_args_private_proxy(r)
return r unless !wspauto && wspsrv
r += ['/Proxy', '', '-Psrv', wspsrv]
r += ['-PPort', wspport.to_s] if wspport
r += ['-PUser', wspuser] if wspuser
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method uri_query
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def uri_query
r = ''
r << "N=#{usr}&" if usr
r << "P=#{pwd}&" if pwd
r << "L=#{locale}&" if locale
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method included
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.included(base)
base.fields.each do |f|
base.send(:attr_reader, f.downcase.to_sym) unless\
base.instance_methods.include? f.downcase.to_sym
base.send(:attr_writer, f.downcase.to_sym) unless\
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"