Class: GeoCerts::MessageWithCode
- Inherits:
-
Object
- Object
- GeoCerts::MessageWithCode
- Defined in:
- lib/geo_certs/errors.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ MessageWithCode
constructor
A new instance of MessageWithCode.
-
#to_s ⇒ Object
:nodoc:.
Constructor Details
#initialize(attributes = {}) ⇒ MessageWithCode
Returns a new instance of MessageWithCode.
6 7 8 9 |
# File 'lib/geo_certs/errors.rb', line 6 def initialize(attributes = {}) self.code = attributes[:code].to_i self. = attributes[:message] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/geo_certs/errors.rb', line 4 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/geo_certs/errors.rb', line 4 def @message end |
Instance Method Details
#to_s ⇒ Object
:nodoc:
11 12 13 |
# File 'lib/geo_certs/errors.rb', line 11 def to_s #:nodoc: "#{self.class.name} ##{code}: #{}" end |