armandofox/audience1st

View on GitHub
app/models/show.rb

Summary

Maintainability
A
2 hrs
Test Coverage
A
92%

Class Show has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

class Show < ActiveRecord::Base

  REGULAR_SHOW = 'Regular Show'
  TYPES = [REGULAR_SHOW, 'Special Event', 'Class', 'Subscription']

Severity: Minor
Found in app/models/show.rb - About 2 hrs to fix

    Method Show#special? is defined at both app/models/show.rb:60 and app/models/show.rb:71.
    Open

      def special? ; event_type != 'Regular Show' ; end
    Severity: Minor
    Found in app/models/show.rb by rubocop

    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

      def special ; special? ; end
    Severity: Minor
    Found in app/models/show.rb by rubocop

    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

    There are no issues that match your filters.

    Category
    Status