Class: JsonApiErrors::Templates::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/json_api_errors/templates/default.rb

Instance Method Summary collapse

Instance Method Details

#codeObject



25
26
27
# File 'lib/json_api_errors/templates/default.rb', line 25

def code
  "default-code"
end

#detailObject



39
40
41
# File 'lib/json_api_errors/templates/default.rb', line 39

def detail
  "default_detail"
end

#idObject



17
18
19
# File 'lib/json_api_errors/templates/default.rb', line 17

def id
  "default-id"
end


29
30
31
32
33
# File 'lib/json_api_errors/templates/default.rb', line 29

def links
  {
    about: "default-links"
  }
end

#metaObject



50
51
52
53
54
# File 'lib/json_api_errors/templates/default.rb', line 50

def meta
  {
    about: "default-meta"
  }
end

#renderObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/json_api_errors/templates/default.rb', line 4

def render
  {
    id:     id,
    status: status,
    code:   code,
    links:  links,
    title:  title,
    detail: detail,
    source: source,
    meta:   meta
  }
end

#sourceObject



43
44
45
46
47
48
# File 'lib/json_api_errors/templates/default.rb', line 43

def source
  {
    pointer: "default-pointer",
    parameter: "default-parameter"
  }
end

#statusObject



21
22
23
# File 'lib/json_api_errors/templates/default.rb', line 21

def status
  "default_status"
end

#titleObject



35
36
37
# File 'lib/json_api_errors/templates/default.rb', line 35

def title
  "default-title"
end