Class: Emendate::Examples::RowSet

Inherits:
Object
  • Object
show all
Includes:
Taggable
Defined in:
lib/emendate/examples/row_set.rb

Overview

rubocop:todo Layout/LineLength Optionally filters Csv rows by date type and/or data set tags. If those are not given, rubocop:enable Layout/LineLength

returns all Csv rows

rubocop:todo Layout/LineLength A Row is literally one row of data, which may or may not be a testable example set on rubocop:enable Layout/LineLength rubocop:todo Layout/LineLength

its own. Examples::ExampleSet handles grouping rows into TestableExample objects

rubocop:enable Layout/LineLength

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Taggable

#set_up_tags, #tags_to_s

Constructor Details

#initialize(data_sets: "", date_types: "") ⇒ RowSet

Returns a new instance of RowSet.



23
24
25
26
27
# File 'lib/emendate/examples/row_set.rb', line 23

def initialize(data_sets: "", date_types: "")
  @csvrows = Examples::Csv.new.rows
  set_up_tags(data_sets, date_types)
  @rows = filter_rows
end

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



21
22
23
# File 'lib/emendate/examples/row_set.rb', line 21

def rows
  @rows
end

Instance Method Details

#to_sObject Also known as: inspect



29
30
31
# File 'lib/emendate/examples/row_set.rb', line 29

def to_s
  "#{rows.length} rows #{tags_to_s}"
end