Sha256: 45b3cd94bb39762f35ae51fa1e9aa07d2b7725438ee159051fb5abce457206d3

Contents?: true

Size: 429 Bytes

Versions: 14

Compression:

Stored size: 429 Bytes

Contents

#TODO deprecated in latest api version?
module Beatport
  module Catalog
    class Feature < Item
      # associated this manually since we don't know the type of the items by default
      attr_reader :items
    
      def initialize(data = {})
        item_klass = Support::Inflector.constantize("Beatport::Catalog::#{data['type']}")

        associate(data, 'items', true, item_klass)
        super
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
beatport-0.4.0 lib/beatport/catalog/feature.rb
beatport-0.3.0 lib/beatport/catalog/feature.rb
beatport-0.2.3 lib/beatport/catalog/feature.rb
beatport-0.2.2 lib/beatport/catalog/feature.rb
beatport-0.2.1 lib/beatport/catalog/feature.rb
beatport-0.2.0 lib/beatport/catalog/feature.rb
beatport-0.1.10 lib/beatport/catalog/feature.rb
beatport-0.1.9 lib/beatport/catalog/feature.rb
beatport-0.1.8 lib/beatport/catalog/feature.rb
beatport-0.1.7 lib/beatport/catalog/feature.rb
beatport-0.1.6 lib/beatport/catalog/feature.rb
beatport-0.1.5 lib/beatport/catalog/feature.rb
beatport-0.1.3 lib/beatport/catalog/feature.rb
beatport-0.1.2 lib/beatport/catalog/feature.rb