Exception: Clayful::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model = nil, method = nil, status = nil, headers = nil, code = nil, message = '', validation = nil) ⇒ Exception

Returns a new instance of Exception.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/exception.rb', line 14

def initialize(
	model = nil,
	method = nil,
	status = nil,
	headers = nil,
	code = nil,
	message = '',
	validation = nil)

	@is_clayful = true
	@model = model
	@method = method
	@status = status
	@headers = headers
	@code = code
	@message = message
	@validation = validation

	super(message)

end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



10
11
12
# File 'lib/exception.rb', line 10

def code
  @code
end

#headersObject (readonly)

Returns the value of attribute headers.



9
10
11
# File 'lib/exception.rb', line 9

def headers
  @headers
end

#is_clayfulObject (readonly)

Returns the value of attribute is_clayful.



5
6
7
# File 'lib/exception.rb', line 5

def is_clayful
  @is_clayful
end

#messageObject (readonly)

Returns the value of attribute message.



11
12
13
# File 'lib/exception.rb', line 11

def message
  @message
end

#methodObject (readonly)

Returns the value of attribute method.



7
8
9
# File 'lib/exception.rb', line 7

def method
  @method
end

#modelObject (readonly)

Returns the value of attribute model.



6
7
8
# File 'lib/exception.rb', line 6

def model
  @model
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/exception.rb', line 8

def status
  @status
end

#validationObject (readonly)

Returns the value of attribute validation.



12
13
14
# File 'lib/exception.rb', line 12

def validation
  @validation
end