lib/ticketmaster/project.rb in ticketmaster-0.5.2 vs lib/ticketmaster/project.rb in ticketmaster-0.5.3
- old
+ new
@@ -86,31 +86,31 @@
# Must be defined by the provider
def self.find_by_id(id)
if self::API.is_a? Class
self.new self::API.find(id)
else
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
end
end
# Accepts an attributes hash and returns all projects matching those attributes in an array
# Should return all projects if the attributes hash is empty
# Must be defined by the provider
def self.find_by_attributes(attributes = {})
if self::API.is_a? Class
self.search(attributes)
else
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
end
end
# This is a helper method to find
def self.search(options = {}, limit = 1000)
if self::API.is_a? Class
projects = self::API.find(:all).collect { |project| self.new project }
search_by_attribute(projects, options, limit)
else
- raise TicketMaster::Exception.new("This method must be reimplemented in the provider")
+ raise TicketMaster::Exception.new("#{self.name}::#{this_method} method must be implemented by the provider")
end
end
# Asks the provider's api for the tickets associated with the project,
# returns an array of Ticket objects.