Class: Dataset::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/dataset/collection.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ Collection

Returns a new instance of Collection.



5
6
7
# File 'lib/dataset/collection.rb', line 5

def initialize(parent)
  concat parent
end

Instance Method Details

#<<(dataset) ⇒ Object



9
10
11
12
13
# File 'lib/dataset/collection.rb', line 9

def <<(dataset)
  super
  uniq!
  self
end

#subset?(other) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/dataset/collection.rb', line 15

def subset?(other)
  Set.new(self).subset?(Set.new(other))
end