module Mongoid::DynamicMatchers::Finder

Public Instance Methods

attributes_hash() click to toggle source
# File lib/mongoid/dynamic_matchers.rb, line 88
def attributes_hash
  "{" + attribute_names.map { |name| ":#{name} => #{name}" }.join(',') + "}"
end
body() click to toggle source
# File lib/mongoid/dynamic_matchers.rb, line 76
def body
  result
end
finder() click to toggle source
# File lib/mongoid/dynamic_matchers.rb, line 92
def finder
  raise NotImplementedError
end
result() click to toggle source
# File lib/mongoid/dynamic_matchers.rb, line 80
def result
  "#{finder}(#{attributes_hash}).first"
end
signature() click to toggle source
# File lib/mongoid/dynamic_matchers.rb, line 84
def signature
  attribute_names.join(', ')
end