repository (DataMapper)

    # File lib/dm-core.rb, line 190
      def self.repository(name = nil)
        current_repository = if name
          assert_kind_of 'name', name, Symbol
          Repository.context.detect { |repository| repository.name == name } || Repository.new(name)
        else
          Repository.context.last || Repository.new(Repository.default_name)
        end

        if block_given?
          current_repository.scope { |*block_args| yield(*block_args) }
        else
          current_repository
        end
      end