Class: CollectionJSON::Error

Inherits:
Hash
  • Object
show all
Defined in:
lib/collection-json/attributes/error.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#codeObject



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

#messageObject



13
# File 'lib/collection-json/attributes/error.rb', line 13

def message; self['message']; end

#message=(value) ⇒ Object



14
# File 'lib/collection-json/attributes/error.rb', line 14

def message=(value); self['message'] = value; end

#titleObject



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