Class: AmazonSellerCentral::ListingSet

Inherits:
Array
  • Object
show all
Defined in:
lib/amazon_seller_central/listing_set.rb

Instance Method Summary collapse

Instance Method Details

#find(selector) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/amazon_seller_central/listing_set.rb', line 4

def find(selector)
  if Listing.is_asin?(selector)
    select{|e| e.asin == selector }
  else
    detect{|e| e.sku == selector }
  end
end