Created
October 10, 2012 08:36
-
-
Save Shinpeim/3864094 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ServicenameAPIError < StandardError | |
def self.error_id(id) | |
define_method :error_id do | |
id | |
end | |
end | |
def self.description(description) | |
define_method :description do | |
description | |
end | |
end | |
end | |
class RoomNotFoundError < ServicenameAPIError | |
error_id 1 | |
description "room not found" | |
end | |
class TooLargeRequestError < ServicenameAPIError | |
error_id 2 | |
description "too large request" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment