Sha256: 8ab64fed1120288a93cc05fd6939cbd186637f48666be557d07bfa14e0408fba

Contents?: true

Size: 471 Bytes

Versions: 7

Compression:

Stored size: 471 Bytes

Contents

module CDQ
  class CDQCollectionProxy < CDQTargetedQuery

    def initialize(objects, entity_description)
      @objects = objects
      super(entity_description, constantize(entity_description.managedObjectClassName))
      @predicate = self.where("%@ CONTAINS SELF", @objects).predicate
    end

    def count
      @objects.size
    end

    def get
      @objects
    end

    def array
      @objects
    end

    def first
      @objects.first
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cdq-0.1.10 motion/cdq/collection_proxy.rb
cdq-0.1.9 motion/cdq/collection_proxy.rb
cdq-0.1.8 motion/cdq/collection_proxy.rb
cdq-0.1.7 motion/cdq/collection_proxy.rb
cdq-0.1.6 motion/cdq/collection_proxy.rb
cdq-0.1.5 motion/cdq/collection_proxy.rb
cdq-0.1.2 motion/cdq/collection_proxy.rb