Class: Mongory::Converters::Converted::Array

Inherits:
Array
  • Object
show all
Includes:
Mongory::Converters::Converted
Defined in:
lib/mongory/converters/converted.rb

Overview

Converts a flat condition array into a nested structure. Applies value conversion to each element. This is used for conditions that are arrays of values. It is used internally by the ConditionConverter and ValueConverter to handle the conversion of complex data types into a format suitable for MongoDB queries.

Instance Method Summary collapse

Methods included from Mongory::Converters::Converted

#instance_convert

Constructor Details

#initialize(other) ⇒ Array

Returns a new instance of Array.



72
73
74
75
76
77
# File 'lib/mongory/converters/converted.rb', line 72

def initialize(other)
  super()
  other.each do |v|
    self << instance_convert(v)
  end
end