class MessageBird::HTTP::ResponseCode
Constants
- RESPONSE_CODES
Public Class Methods
decode(string)
click to toggle source
# File lib/messagebird/http/response_code.rb, line 25 def self.decode(string) RESPONSE_CODES[string] || raise(ResponseCodeNotFound.new(string)) end
new(symbol, description)
click to toggle source
# File lib/messagebird/http/response_code.rb, line 4 def initialize(symbol, description) @symbol = symbol @description = description end
Public Instance Methods
==(other)
click to toggle source
# File lib/messagebird/http/response_code.rb, line 17 def ==(other) if other.is_a? Symbol self.to_sym == other else self.to_s == other end end
to_s()
click to toggle source
# File lib/messagebird/http/response_code.rb, line 13 def to_s @description end
to_sym()
click to toggle source
# File lib/messagebird/http/response_code.rb, line 9 def to_sym @symbol end