app/models/show.rb
Class Show
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class Show < ActiveRecord::Base
REGULAR_SHOW = 'Regular Show'
TYPES = [REGULAR_SHOW, 'Special Event', 'Class', 'Subscription']
Method Show#special?
is defined at both app/models/show.rb:60 and app/models/show.rb:71. Open
Open
def special? ; event_type != 'Regular Show' ; end
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end
Method Show#special
is defined at both app/models/show.rb:61 and app/models/show.rb:72. Open
Open
def special ; special? ; end
- Read upRead up
- Exclude checks
This cop checks for duplicated instance (or singleton) method definitions.
Example:
# bad
def duplicated
1
end
def duplicated
2
end
Example:
# bad
def duplicated
1
end
alias duplicated other_duplicated
Example:
# good
def duplicated
1
end
def other_duplicated
2
end