afaur/ruby-nicefn

View on GitHub
exa/before/inst.rb

Summary

Maintainability
A
0 mins
Test Coverage

Do not prefix writer method names with set_.
Open

  def self.set_klass_property(value)
Severity: Minor
Found in exa/before/inst.rb by rubocop

This cop makes sure that accessor methods are named properly.

Example:

# bad
def set_attribute(value)
end

# good
def attribute=(value)
end

# bad
def get_attribute
end

# good
def attribute
end

Replace class var @@klass_property with a class instance var.
Open

    @@klass_property = value
Severity: Minor
Found in exa/before/inst.rb by rubocop

This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.

Omit the parentheses in defs when the method doesn't accept any arguments.
Open

  def self.print_klass_property()
Severity: Minor
Found in exa/before/inst.rb by rubocop

This cop checks for parentheses in the definition of a method, that does not take any arguments. Both instance and class/singleton methods are checked.

Example:

# bad
def foo()
  # does a thing
end

# good
def foo
  # does a thing
end

# also good
def foo() does_a_thing end

Example:

# bad
def Baz.foo()
  # does a thing
end

# good
def Baz.foo
  # does a thing
end

There are no issues that match your filters.

Category
Status