Class: Trav3::Response

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/trav3/result.rb

Direct Known Subclasses

RequestError, Success

Instance Method Summary collapse

Constructor Details

#initialize(travis, response) ⇒ Response

Returns a new instance of Response


37
38
39
40
41
# File 'lib/trav3/result.rb', line 37

def initialize(travis, response)
  @travis = travis
  @response = response
  @json = JSON.parse(response.body)
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)

Raises:


51
52
53
# File 'lib/trav3/result.rb', line 51

def failure?
  raise Unimplemented
end

#inspectObject


43
44
45
# File 'lib/trav3/result.rb', line 43

def inspect
  "<#{self.class} Response: keys = #{keys}>"
end

#success?Boolean

Returns:

  • (Boolean)

Raises:


47
48
49
# File 'lib/trav3/result.rb', line 47

def success?
  raise Unimplemented
end