Class: Dataset::Collection
- Inherits:
-
Array
- Object
- Array
- Dataset::Collection
- Defined in:
- lib/dataset/collection.rb
Overview
:nodoc:
Instance Method Summary collapse
- #<<(dataset) ⇒ Object
-
#initialize(parent) ⇒ Collection
constructor
A new instance of Collection.
- #subset?(other) ⇒ Boolean
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
15 16 17 |
# File 'lib/dataset/collection.rb', line 15 def subset?(other) Set.new(self).subset?(Set.new(other)) end |