module Mongo::Operation::PolymorphicResult

Shared behavior of instantiating a result class matching the operation class.

This module must be included after Executable module because #result_class is defined in both.

@api private

Private Instance Methods

result_class() click to toggle source
# File lib/mongo/operation/shared/polymorphic_result.rb, line 30
def result_class
  begin
    polymorphic_class(self.class.name, :Result)
  rescue NameError
    polymorphic_class(self.class.name.sub(/::[^:]*$/, ''), :Result)
  end
end