File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
lib/mongo/collection/view Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class Aggregation
58
58
#
59
59
# @since 2.0.0
60
60
def allow_disk_use ( value = nil )
61
- configure ( OPTIONS_MAP [ __method__ ] , value )
61
+ configure ( __method__ , value )
62
62
end
63
63
64
64
# Initialize the aggregation for the provided collection view, pipeline
@@ -99,19 +99,13 @@ def aggregate_spec
99
99
:aggregate => collection . name ,
100
100
:pipeline => pipeline ,
101
101
:cursor => cursor ,
102
- } . merge! ( process_options )
102
+ } . merge! ( agg_options )
103
103
}
104
104
end
105
105
106
- def process_options
107
- @agg_options ||= @options . each . reduce ( { } ) do |opts , ( key , value ) |
108
- if OPTIONS_MAP [ key ]
109
- opts . merge ( OPTIONS_MAP [ key ] => value )
110
- elsif OPTIONS_MAP . values . include? ( key )
111
- opts . merge ( key => value )
112
- else
113
- opts
114
- end
106
+ def agg_options
107
+ @agg_options ||= options . each . reduce ( { } ) do |opts , ( key , value ) |
108
+ OPTIONS_MAP [ key ] ? opts . merge! ( OPTIONS_MAP [ key ] => value ) : opts
115
109
end
116
110
end
117
111
You can’t perform that action at this time.
0 commit comments