Sha256: 10d032106413239245f1b795c729fc0a697f509147e11cfe57e568fad630f226

Contents?: true

Size: 279 Bytes

Versions: 46

Compression:

Stored size: 279 Bytes

Contents

require 'set'

module Dataset
  class Collection < Array # :nodoc:
    def initialize(parent)
      concat parent
    end
    
    def <<(dataset)
      super
      uniq!
      self
    end
    
    def subset?(other)
      Set.new(self).subset?(Set.new(other))
    end
  end
end

Version data entries

46 entries across 46 versions & 8 rubygems

Version Path
codders-dataset-1.3.2.1 lib/dataset/collection.rb
radiantcms-couchrest_model-0.2.4 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.2.2 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.2.1 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.2 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.9 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.8 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.7 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.6 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.5 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.4 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.3 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.2 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1.1 vendor/plugins/dataset/lib/dataset/collection.rb
radiantcms-couchrest_model-0.1 vendor/plugins/dataset/lib/dataset/collection.rb
radiant-0.7.2 vendor/plugins/dataset/lib/dataset/collection.rb
be9-dataset-1.3.3 lib/dataset/collection.rb
radiant-0.9.1 vendor/plugins/dataset/lib/dataset/collection.rb
radiant-0.8.2 vendor/plugins/dataset/lib/dataset/collection.rb
radiant-0.9.0.rc2 vendor/plugins/dataset/lib/dataset/collection.rb