Class: Roseflow::Pinecone::BaseResponse

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

Direct Known Subclasses

CollectionResponse, IndexResponse, VectorResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method:, response:) ⇒ BaseResponse

Returns a new instance of BaseResponse.



10
11
12
13
14
# File 'lib/roseflow/pinecone/response.rb', line 10

def initialize(method:, response:)
  @response = response
  @method_ = method
  handle_response
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/roseflow/pinecone/response.rb', line 6

def body
  @body
end

#objectObject (readonly)

Returns the value of attribute object.



8
9
10
# File 'lib/roseflow/pinecone/response.rb', line 8

def object
  @object
end

#statusObject (readonly)

Returns the value of attribute status.



7
8
9
# File 'lib/roseflow/pinecone/response.rb', line 7

def status
  @status
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/roseflow/pinecone/response.rb', line 16

def success?
  @response.success?
end