Exception: FabricCA::Error
- Inherits:
-
StandardError
- Object
- StandardError
- FabricCA::Error
- Defined in:
- lib/fabric_ca/error.rb
Instance Attribute Summary collapse
-
#full_message ⇒ Object
readonly
Returns the value of attribute full_message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(message, response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, response) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 |
# File 'lib/fabric_ca/error.rb', line 5 def initialize(, response) super @response = Hashie::Mash.new JSON.parse(response.body) @full_message = @response.errors.map(&:message).join(', ') end |
Instance Attribute Details
#full_message ⇒ Object (readonly)
Returns the value of attribute full_message.
3 4 5 |
# File 'lib/fabric_ca/error.rb', line 3 def @full_message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/fabric_ca/error.rb', line 3 def response @response end |