Class: CollectionJSON::Error
- Inherits:
-
Hash
- Object
- Hash
- CollectionJSON::Error
- Defined in:
- lib/collection-json/attributes/error.rb
Class Method Summary collapse
Instance Method Summary collapse
- #code ⇒ Object
- #code=(value) ⇒ Object
- #message ⇒ Object
- #message=(value) ⇒ Object
- #title ⇒ Object
- #title=(value) ⇒ Object
Class Method Details
.from_hash(hash) ⇒ Object
3 4 5 |
# File 'lib/collection-json/attributes/error.rb', line 3 def self.from_hash(hash) self.new.merge! hash end |
Instance Method Details
#code ⇒ Object
10 |
# File 'lib/collection-json/attributes/error.rb', line 10 def code; self['code']; end |
#code=(value) ⇒ Object
11 |
# File 'lib/collection-json/attributes/error.rb', line 11 def code=(value); self['code'] = value; end |
#message ⇒ Object
13 |
# File 'lib/collection-json/attributes/error.rb', line 13 def ; self['message']; end |
#message=(value) ⇒ Object
14 |
# File 'lib/collection-json/attributes/error.rb', line 14 def (value); self['message'] = value; end |
#title ⇒ Object
7 |
# File 'lib/collection-json/attributes/error.rb', line 7 def title; self['title']; end |
#title=(value) ⇒ Object
8 |
# File 'lib/collection-json/attributes/error.rb', line 8 def title=(value); self['title'] = value; end |