Class: Roseflow::Pinecone::Vector::Filter

Inherits:
Hash
  • Object
show all
Defined in:
lib/roseflow/pinecone/vectors/filter.rb

Defined Under Namespace

Classes: FilterContract

Class Method Summary collapse

Class Method Details

.default?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/roseflow/pinecone/vectors/filter.rb', line 67

def self.default?
  nil
end

.new(input) ⇒ Object



58
59
60
61
62
63
64
65
# File 'lib/roseflow/pinecone/vectors/filter.rb', line 58

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