Class: Pinecone::Vector::SparseVector
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Pinecone::Vector::SparseVector
- Defined in:
- lib/pinecone/vector/sparse_vector.rb
Defined Under Namespace
Classes: SparseVectorContract
Class Method Summary collapse
Class Method Details
.new(input) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/pinecone/vector/sparse_vector.rb', line 30 def self.new(input) validation = SparseVectorContract.new.call(input) if validation.success? super else raise ArgumentError.new(validation.errors.to_h.inspect) end end |