class Stellar::Horizon::Problem

Public Class Methods

new(attributes) click to toggle source
# File lib/stellar/horizon/problem.rb, line 6
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
# File lib/stellar/horizon/problem.rb, line 32
def detail
  @attributes[:detail] 
end
instance() click to toggle source
# File lib/stellar/horizon/problem.rb, line 37
def instance
  @attributes[:instance] 
end
meta() click to toggle source
# File lib/stellar/horizon/problem.rb, line 42
def meta
  @attributes[:instance] 
end
status() click to toggle source
# File lib/stellar/horizon/problem.rb, line 27
def status
  @attributes[:status] 
end
title() click to toggle source
# File lib/stellar/horizon/problem.rb, line 22
def title
  @attributes[:title] 
end
type() click to toggle source
# File lib/stellar/horizon/problem.rb, line 17
def type
  @attributes[:type] 
end