Class: JSONAPI::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonapi/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Error

Returns a new instance of Error.



6
7
8
9
10
11
12
13
14
15
# File 'lib/jsonapi/error.rb', line 6

def initialize(options={})
  @title          = options[:title]
  @detail         = options[:detail]
  @id             = options[:id]
  @href           = options[:href]
  @code           = options[:code]
  @path           = options[:path]
  @links          = options[:links]
  @status         = options[:status]
end

Instance Attribute Details

#code ⇒ Object

Returns the value of attribute code.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def code
  @code
end

#detail ⇒ Object

Returns the value of attribute detail.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def detail
  @detail
end

#href ⇒ Object

Returns the value of attribute href.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def href
  @href
end

#id ⇒ Object

Returns the value of attribute id.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def id
  @id
end

Returns the value of attribute links.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def links
  @links
end

#path ⇒ Object

Returns the value of attribute path.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def path
  @path
end

#status ⇒ Object

Returns the value of attribute status.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def status
  @status
end

#title ⇒ Object

Returns the value of attribute title.



4
5
6
# File 'lib/jsonapi/error.rb', line 4

def title
  @title
end