Class: BugBunny::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/bug_bunny/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Response

Returns a new instance of Response.



5
6
7
8
9
# File 'lib/bug_bunny/response.rb', line 5

def initialize(attrs={})
  @status    = attrs[:status]
  @response  = attrs[:response]
  @exception = attrs[:exception]
end

Instance Attribute Details

#exceptionObject

Returns the value of attribute exception.



3
4
5
# File 'lib/bug_bunny/response.rb', line 3

def exception
  @exception
end

#responseObject

Returns the value of attribute response.



3
4
5
# File 'lib/bug_bunny/response.rb', line 3

def response
  @response
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/bug_bunny/response.rb', line 3

def status
  @status
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


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

def success?
  @status
end