Showing 47 of 67 total issues
Class Configuration
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
class Configuration
include Singleton
class << self
Class API
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
class API
include Vedeu::Common
# @param (see #initialize)
Class DSL
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class DSL
include Vedeu::DSL
include Vedeu::DSL::Border
include Vedeu::DSL::Presentation
Class Cursor
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class Cursor
include Vedeu::Repositories::Model
include Vedeu::Toggleable
extend Forwardable
Class Document
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
class Document
include Vedeu::Repositories::Defaults
include Vedeu::Repositories::Model
extend Forwardable
Class Alignment
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
class Alignment
include Vedeu::Common
# @!attribute [r] value
Class Attributes
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Attributes
include Vedeu::Common
# @param (see #initialize)
Class Move
has 21 methods (exceeds 20 allowed). Consider refactoring. Open
class Move
include Vedeu::Repositories::Defaults
extend Forwardable
Method coerce
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def coerce(collection = [], parent = nil, name = nil)
if collection.is_a?(Vedeu::Views::Streams)
collection
elsif array?(collection)
- 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 coerce
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def coerce(collection = [], parent = nil, name = nil)
if collection.is_a?(Vedeu::Views::Chars)
collection
elsif array?(collection)
- 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 coerce
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def coerce(collection = [], parent = nil, name = nil)
if collection.is_a?(Vedeu::Views::Lines)
collection
elsif collection.is_a?(Vedeu::Views::Streams)
- 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 attributes
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def attributes
{
client: client,
height: @height.is_a?(Proc) ? @height.call : @height,
horizontal_alignment: horizontal_alignment,
- 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 defaults
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def defaults
{
background: :default,
base_path: base_path,
colour_mode: detect_colour_mode,
Method coerce
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def coerce
if coerced?
value
elsif hash?(value)
- 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 read
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def read
Vedeu.log(type: :input, message: "Waiting for user input...\n")
if raw_mode?
Vedeu.trigger(:_keypress_, keypress)
- 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 coerce
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def coerce(collection = [], parent = nil, name = nil)
if collection.is_a?(Vedeu::Views::Streams)
collection
elsif array?(collection)
Method parse
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def parse
lines_collection = Vedeu::Views::Lines.new
lines.each do |line|
line_object = Vedeu::Views::Line.new
- 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 loggable?
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def loggable?(type)
return false unless log?
return false unless Vedeu::LOG_TYPES_KEYS.include?(type)
return true if log_only.empty? && log_except.empty?
- 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 add
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def add(name, focus = false)
if registered?(name)
return storage unless focus
by_name(name)
- 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 bordered_width
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def bordered_width
return width unless border && enabled?
if left? && right?
width - 2
- 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"