Sha256: 2480056dd90963d7484f96dec73719abe9f80bffdb9b62ca5cd09bc31ef5ff1d

Contents?: true

Size: 603 Bytes

Versions: 6

Compression:

Stored size: 603 Bytes

Contents

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

      # TODO: document this
      # @api public
      def select(&block)
        all.select(&block)
      end

      # TODO: document this
      # @api public
      def detect(&block)
        all.detect(&block)
      end

      # TODO: document this
      # @api public
      def reject(&block)
        all.reject(&block)
      end
    end # module Model
  end # module Ambition
end # module DataMapper

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
dkubb-dm-ambition-0.10.0 lib/dm-ambition/model.rb
dm-ambition-1.0.0 lib/dm-ambition/model.rb
dm-ambition-1.0.0.rc3 lib/dm-ambition/model.rb
dm-ambition-1.0.0.rc2 lib/dm-ambition/model.rb
dm-ambition-1.0.0.rc1 lib/dm-ambition/model.rb
dm-ambition-0.10.2 lib/dm-ambition/model.rb