Exception: Beget::AnswerError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/beget_api.rb

Overview

Answer error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ AnswerError

Returns a new instance of AnswerError.



102
103
104
105
# File 'lib/beget_api.rb', line 102

def initialize(errors)
  super()
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



100
101
102
# File 'lib/beget_api.rb', line 100

def errors
  @errors
end

Instance Method Details

#to_sObject



107
108
109
# File 'lib/beget_api.rb', line 107

def to_s
  @errors.map { |e| %(#{e['error_code']}: #{e['error_text']}) }.join('; ')
end