Module: Pest::DataSet

Includes:
Enumerable
Included in:
Hash, NArray
Defined in:
lib/pest/data_set.rb

Defined Under Namespace

Modules: ClassMethods Classes: Hash, NArray

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data.



8
9
10
# File 'lib/pest/data_set.rb', line 8

def data
  @data
end

#variablesObject Also known as: v

Returns the value of attribute variables.



8
9
10
# File 'lib/pest/data_set.rb', line 8

def variables
  @variables
end

Class Method Details

.included(base) ⇒ Object



2
3
4
# File 'lib/pest/data_set.rb', line 2

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#+(other) ⇒ Object

Raises:

  • (NotImplementedError)


54
55
56
# File 'lib/pest/data_set.rb', line 54

def +(other)
  raise NotImplementedError
end

#==(other) ⇒ Object Also known as: eql?



32
33
34
# File 'lib/pest/data_set.rb', line 32

def ==(other)
  variables == other.variables and data == other.data
end

#[](*args) ⇒ Object

Raises:

  • (NotImplementedError)


37
38
39
# File 'lib/pest/data_set.rb', line 37

def [](*args)
  raise NotImplementedError
end

#destroyObject

Raises:

  • (NotImplementedError)


24
25
26
# File 'lib/pest/data_set.rb', line 24

def destroy
  raise NotImplementedError
end

#each(&block) ⇒ Object

Raises:

  • (NotImplementedError)


62
63
64
# File 'lib/pest/data_set.rb', line 62

def each(&block)
  raise NotImplementedError
end

#except(start, finish) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/pest/data_set.rb', line 41

def except(start, finish)
  left = start > 0 ? self[0..start] : nil
  right = finish < length - 1 ? self[finish..-1] : nil
  case [left.nil?, right.nil?]
  when [true, false]
    right
  when [false, true]
    left
  when [false, false]
    right + left
  end
end

#initialize(variables = Set.new, data = nil) ⇒ Object



10
11
12
13
# File 'lib/pest/data_set.rb', line 10

def initialize(variables = Set.new, data = nil)
  @variables = variables
  @data = data
end

#lengthObject

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/pest/data_set.rb', line 28

def length
  raise NotImplementedError
end

#merge(other) ⇒ Object

Raises:

  • (NotImplementedError)


66
67
68
# File 'lib/pest/data_set.rb', line 66

def merge(other)
  raise NotImplementedError
end

#pick(*args) ⇒ Object

Raises:

  • (NotImplementedError)


58
59
60
# File 'lib/pest/data_set.rb', line 58

def pick(*args)
  raise NotImplementedError
end

#save(*args) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/pest/data_set.rb', line 20

def save(*args)
  raise NotImplementedError
end

#to_hash(*args) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/pest/data_set.rb', line 16

def to_hash(*args)
  raise NotImplementedError
end