Exception: Beget::RequestError

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

Overview

General method error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, text) ⇒ RequestError

Returns a new instance of RequestError.



86
87
88
89
90
# File 'lib/beget_api.rb', line 86

def initialize(code, text)
  super()
  @code = code
  @text = text
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



84
85
86
# File 'lib/beget_api.rb', line 84

def code
  @code
end

#textObject (readonly)

Returns the value of attribute text.



84
85
86
# File 'lib/beget_api.rb', line 84

def text
  @text
end

Instance Method Details

#to_sObject



92
93
94
# File 'lib/beget_api.rb', line 92

def to_s
  %(#{@code}: #{@text})
end