andela-oosiname/mastermind_sname

View on GitHub
lib/mastermind_sname/sname/message.rb

Summary

Maintainability
A
0 mins
Test Coverage

Favor a normal if-statement over a modifier clause in a multiline statement.
Open

      @colours = "(r)ed, (g)reen, (y)ellow, (b)lue, (o)"\
      "range, (v)iolet" if colours.length == 8

Checks for uses of if/unless modifiers with multiple-lines bodies.

Example:

# bad
{
  result: 'this should not happen'
} unless cond

# good
{ result: 'ok' } if cond

Favor a normal if-statement over a modifier clause in a multiline statement.
Open

      @colours = "(r)ed, (g)reen, (y)ellow, (b)lue, (o)"\
      "range" if colours.length == 6

Checks for uses of if/unless modifiers with multiple-lines bodies.

Example:

# bad
{
  result: 'this should not happen'
} unless cond

# good
{ result: 'ok' } if cond

There are no issues that match your filters.

Category
Status