Class: Opticon::Failure::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/opticon/failure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, condition, response) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
# File 'lib/opticon/failure.rb', line 7

def initialize(uri, condition, response)
  @uri = uri
  @condition = condition
  @response = response
end

Instance Attribute Details

#conditionObject (readonly)

Returns the value of attribute condition.



4
5
6
# File 'lib/opticon/failure.rb', line 4

def condition
  @condition
end

#exceptionObject

Returns the value of attribute exception.



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

def exception
  @exception
end

#responseObject (readonly)

Returns the value of attribute response.



4
5
6
# File 'lib/opticon/failure.rb', line 4

def response
  @response
end

#uriObject (readonly)

Returns the value of attribute uri.



4
5
6
# File 'lib/opticon/failure.rb', line 4

def uri
  @uri
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/opticon/failure.rb', line 13

def to_s
  "#<#{self.class} [#{uri}] #{failure_message}>"
end