class IletiMerkezi::Status

Status

Constants

CODES

Attributes

code[R]
message[R]
type[R]

Public Class Methods

find(code) click to toggle source
# File lib/ileti_merkezi/status.rb, line 37
def self.find(code)
  value = CODES[code.to_i] || {}
  new(value.merge(code: code))
end
new(options = {}) click to toggle source
# File lib/ileti_merkezi/status.rb, line 31
def initialize(options = {})
  @code    = options[:code].to_i
  @type    = options[:type]
  @message = options[:message]
end

Public Instance Methods

error?() click to toggle source
# File lib/ileti_merkezi/status.rb, line 42
def error?
  type == :error
end
info?() click to toggle source
# File lib/ileti_merkezi/status.rb, line 46
def info?
  type == :info
end
success?() click to toggle source
# File lib/ileti_merkezi/status.rb, line 50
def success?
  info?
end