Module: Roseflow::Pinecone::Vectors::Common::ClassMethods

Defined in:
lib/roseflow/pinecone/vectors/common.rb

Class Method Summary collapse

Class Method Details

.new(input) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/roseflow/pinecone/vectors/common.rb', line 16

def self.new(input)
  validation = self.contract_object.new.call(input)
  if validation.success?
    super(input)
  else
    raise ArgumentError.new(validation.errors.to_h.inspect)
  end
end