class Rubycritic::Smell

def ==(other)

def ==(other)
  self.class == other.class && state == other.state
end

def at_location?(other_location)

def at_location?(other_location)
  locations.any? { |location| location == other_location }
end

def at_pathname?(other_pathname)

def at_pathname?(other_pathname)
  pathnames.any? { |pathname| pathname == other_pathname }
end

def has_multiple_locations?

def has_multiple_locations?
  locations.length > 1
end

def hash

def hash
  state.hash
end

def pathnames

def pathnames
  @pathnames ||= locations.map(&:pathname).uniq
end

def state

def state
  [@context, @message, @score, @type]
end

def to_s

def to_s
  "(#{type}) #{context} #{message}"
end