class Stellar::Horizon::Problem

Public Class Methods

new(attributes) click to toggle source
# File lib/stellar/horizon/problem.rb, line 4
def initialize(attributes)
  @attributes = attributes.reverse_merge({
    type: "about:blank",
    title: "Unknown Error",
    status: 500
  })

  @meta = @attributes.except!(:type, :title, :status, :detail, :instance)
end

Public Instance Methods

detail() click to toggle source

@return [String]

# File lib/stellar/horizon/problem.rb, line 30
def detail
  @attributes[:detail]
end
instance() click to toggle source

@return [String]

# File lib/stellar/horizon/problem.rb, line 35
def instance
  @attributes[:instance]
end
meta() click to toggle source

@return [{String => Object}]

# File lib/stellar/horizon/problem.rb, line 40
def meta
  @attributes[:instance]
end
status() click to toggle source

@return [Integer]

# File lib/stellar/horizon/problem.rb, line 25
def status
  @attributes[:status]
end
title() click to toggle source

@return [String]

# File lib/stellar/horizon/problem.rb, line 20
def title
  @attributes[:title]
end
type() click to toggle source

@return [String]

# File lib/stellar/horizon/problem.rb, line 15
def type
  @attributes[:type]
end