lib/peddler/marketplace.rb in peddler-1.3.0 vs lib/peddler/marketplace.rb in peddler-1.4.0
- old
+ new
@@ -18,11 +18,11 @@
BadId = Class.new(StandardError)
attr_reader :id
def initialize(id)
- @id = id || fail(BadId, 'missing MarketplaceId')
+ @id = id || raise(BadId, 'missing MarketplaceId')
end
def host
@host ||= find_host
end
@@ -42,10 +42,10 @@
end
private
def find_host
- HOSTS.fetch(id) { fail BadId, %("#{id}" is not a valid MarketplaceId) }
+ HOSTS.fetch(id) { raise BadId, %("#{id}" is not a valid MarketplaceId) }
end
def japanese?
host.end_with?('jp')
end