Module: MongoModel::Scope::ArrayMethods

Included in:
MongoModel::Scope
Defined in:
lib/mongomodel/support/scope/array_methods.rb

Instance Method Summary collapse

Instance Method Details

#any?(&block) ⇒ Boolean


4
5
6
7
8
9
10
# File 'lib/mongomodel/support/scope/array_methods.rb', line 4

def any?(&block)
  if block_given?
    to_a.any?(&block)
  else
    !empty?
  end
end

#select(*args, &block) ⇒ Object


12
13
14
15
16
17
18
# File 'lib/mongomodel/support/scope/array_methods.rb', line 12

def select(*args, &block)
  if block_given?
    to_a.select(&block)
  else
    super
  end
end