Class: TheArrayComparator::Sample
- Inherits:
-
Object
- Object
- TheArrayComparator::Sample
- Defined in:
- lib/the_array_comparator/sample.rb
Overview
class holding the data for the comparism
Instance Attribute Summary collapse
-
#data ⇒ Object
test data.
-
#exceptions ⇒ Object
exceptions from data search.
-
#keywords ⇒ Object
data used to search in other data set.
-
#tag ⇒ Object
description of the probe.
Instance Method Summary collapse
-
#blank? ⇒ true, false
Check if sample is blank: no values for keywords, data, exceptions, tag.
-
#initialize(data = [], keywords = Set.new, exceptions = Set.new, tag = nil) ⇒ Sample
constructor
New sample.
Constructor Details
#initialize(data = [], keywords = Set.new, exceptions = Set.new, tag = nil) ⇒ Sample
New sample
33 34 35 36 37 38 |
# File 'lib/the_array_comparator/sample.rb', line 33 def initialize(data=[],keywords=Set.new,exceptions=Set.new,tag=nil) @keywords = Set.new( [ *keywords ] ) @data = *data @exceptions = Set.new( [ *exceptions ] ) @tag = tag end |
Instance Attribute Details
#data ⇒ Object
test data
18 19 20 |
# File 'lib/the_array_comparator/sample.rb', line 18 def data @data end |
#exceptions ⇒ Object
exceptions from data search
18 |
# File 'lib/the_array_comparator/sample.rb', line 18 attr_accessor :data, :keywords, :exceptions, :tag |
#keywords ⇒ Object
data used to search in other data set
18 |
# File 'lib/the_array_comparator/sample.rb', line 18 attr_accessor :data, :keywords, :exceptions, :tag |
#tag ⇒ Object
description of the probe
18 |
# File 'lib/the_array_comparator/sample.rb', line 18 attr_accessor :data, :keywords, :exceptions, :tag |
Instance Method Details
#blank? ⇒ true, false
Check if sample is blank: no values for keywords, data, exceptions, tag
43 44 45 |
# File 'lib/the_array_comparator/sample.rb', line 43 def blank? @keywords.blank? and @data.blank? and @exceptions.blank? and @tag.blank? end |