Sha256: f0ee4ed6a9f43b6e66bc2516ad69c8488866f4dc73b47589d7e8120cd011038b

Contents?: true

Size: 210 Bytes

Versions: 5

Compression:

Stored size: 210 Bytes

Contents

module Beatport
  module Catalog
    class DynamicImage < Item
      def dynamic_url(options = {})
        url.gsub(/{(\w*)}/) do |m|
          options[m[1...-1].to_sym]
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
beatport-0.4.0 lib/beatport/catalog/dynamic_image.rb
beatport-0.3.0 lib/beatport/catalog/dynamic_image.rb
beatport-0.2.3 lib/beatport/catalog/dynamic_image.rb
beatport-0.2.2 lib/beatport/catalog/dynamic_image.rb
beatport-0.2.1 lib/beatport/catalog/dynamic_image.rb