Exception: Softlayer::Errors::SoftlayerError
- Inherits:
-
StandardError
- Object
- StandardError
- Softlayer::Errors::SoftlayerError
- Defined in:
- lib/softlayer/errors/softlayer_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#problem ⇒ Object
readonly
Returns the value of attribute problem.
-
#resolution ⇒ Object
readonly
Returns the value of attribute resolution.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
-
#compose_message(key, attributes = {}) ⇒ Object
Compose the message.
Instance Attribute Details
#problem ⇒ Object (readonly)
Returns the value of attribute problem.
4 5 6 |
# File 'lib/softlayer/errors/softlayer_error.rb', line 4 def problem @problem end |
#resolution ⇒ Object (readonly)
Returns the value of attribute resolution.
6 7 8 |
# File 'lib/softlayer/errors/softlayer_error.rb', line 6 def resolution @resolution end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
5 6 7 |
# File 'lib/softlayer/errors/softlayer_error.rb', line 5 def summary @summary end |
Instance Method Details
#compose_message(key, attributes = {}) ⇒ Object
Compose the message.
Parameters
- key
-
Lookup key in the translation table.
- attributes
-
The objects to pass to create the message.
12 13 14 15 16 17 18 19 20 |
# File 'lib/softlayer/errors/softlayer_error.rb', line 12 def (key, attributes = {}) @problem = create_problem(key, attributes) @summary = create_summary(key, attributes) @resolution = create_resolution(key, attributes) "\nProblem:\n #{@problem}" \ "\nSummary:\n #{@summary}" \ "\nResolution:\n #{@resolution}" end |