Class: Exwiw::MongoQuery::Find

Inherits:
Struct
  • Object
show all
Defined in:
lib/exwiw/mongo_query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#collectionObject

Returns the value of attribute collection

Returns:

  • (Object)

    the current value of collection



5
6
7
# File 'lib/exwiw/mongo_query.rb', line 5

def collection
  @collection
end

#filterObject

Returns the value of attribute filter

Returns:

  • (Object)

    the current value of filter



5
6
7
# File 'lib/exwiw/mongo_query.rb', line 5

def filter
  @filter
end

#primary_keyObject

Returns the value of attribute primary_key

Returns:

  • (Object)

    the current value of primary_key



5
6
7
# File 'lib/exwiw/mongo_query.rb', line 5

def primary_key
  @primary_key
end

#projectionObject

Returns the value of attribute projection

Returns:

  • (Object)

    the current value of projection



5
6
7
# File 'lib/exwiw/mongo_query.rb', line 5

def projection
  @projection
end

Instance Method Details

#to_hObject



6
7
8
9
10
11
12
13
# File 'lib/exwiw/mongo_query.rb', line 6

def to_h
  {
    collection: collection,
    primary_key: primary_key,
    filter: filter,
    projection: projection,
  }
end