Class: Github::Client::EntityError
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Github::Client::EntityError
- Defined in:
- lib/github/client.rb
Constant Summary collapse
- MISSING =
"missing"
- MISSING_FIELD =
"missing_field"
- INVALID =
"invalid"
- ALREADY_EXISTS =
"already_exists"
Instance Method Summary collapse
Instance Method Details
#description ⇒ Object
126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/github/client.rb', line 126 def description case self.code when MISSING "#{self.resource} is missing" when MISSING_FIELD "#{self.resource}##{self.field} is missing" when INVALID "#{self.resource}##{self.field} is invalid (refer to documentation)" when ALREADY_EXISTS "#{self.resource}##{self.field} value is already taken (must be unique)" else "#{self.resource}##{self.field} error: #{self.code}" end end |
#to_s ⇒ Object
122 123 124 |
# File 'lib/github/client.rb', line 122 def to_s "<Github::Client::EntityError: #{description}>" end |