Module: DataMapper::Ambition::Model

Defined in:
lib/dm-ambition/model.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
# File 'lib/dm-ambition/model.rb', line 4

def self.included(base)
  base.send(:alias_method, :find_all, :select)
  base.send(:alias_method, :find,     :detect)
end

Instance Method Details

#detect(&block) ⇒ Object

TODO: document this



17
18
19
# File 'lib/dm-ambition/model.rb', line 17

def detect(&block)
  all.detect(&block)
end

#reject(&block) ⇒ Object

TODO: document this



23
24
25
# File 'lib/dm-ambition/model.rb', line 23

def reject(&block)
  all.reject(&block)
end

#select(&block) ⇒ Object

TODO: document this



11
12
13
# File 'lib/dm-ambition/model.rb', line 11

def select(&block)
  all.select(&block)
end