Class: Beatport::Catalog::DynamicImage

Inherits:
Item
  • Object
show all
Defined in:
lib/beatport/catalog/dynamic_image.rb

Instance Method Summary collapse

Methods inherited from Item

#[], #associate, associations, find_by_name, has_many, has_one, #id, #initialize, lazy_accessor, #type

Constructor Details

This class inherits a constructor from Beatport::Item

Instance Method Details

#dynamic_url(options = {}) ⇒ Object



4
5
6
7
8
# File 'lib/beatport/catalog/dynamic_image.rb', line 4

def dynamic_url(options = {})
  url.gsub(/{(\w*)}/) do |m|
    options[m[1...-1].to_sym]
  end
end