timcase/echonest

View on GitHub
Echowrap::Asset
A

Similar code found in 1 other location

require 'echowrap/base'

module Echowrap
  class Asset < Echowrap::Base
    attr_reader :explicit, :filename, :id, :release, :title, :type, :year
Found in Echowrap::Asset and 1 other location - About 3 hrs to fix
lib/echowrap/feed.rb on lines 3..9

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Refactorings

Further Reading

There are no issues that match your filters.

require 'echowrap/base'

module Echowrap
  class Asset < Echowrap::Base
    attr_reader :explicit, :filename, :id, :release, :title, :type, :year

    def echonest_ids
      @echonest_ids ||= map_collection(Echowrap::EchonestId, :echonest_ids)
    end

  end
end

Size

Lines of code
9