Class: Kiba::Extend::JobTest::CsvJob::Blank

Inherits:
Object
  • Object
show all
Includes:
Testable
Defined in:
lib/kiba/extend/job_test/csv_job/blank.rb

Overview

Checks that indicated value(s) is/are nil or empty strings

Constant Summary

Constants included from JobTestable

JobTestable::ALLOWED_CONFIG_KEY_PATTERN

Instance Method Summary collapse

Methods included from Testable

#get_job_data

Methods included from JobTestable

#job_data, #result

Constructor Details

#initialize(config) ⇒ Blank

Returns a new instance of Blank.

Parameters:

  • config (Hash)

    Other keys will be part of the config Hash, but are not required for this class’ function

Options Hash (config):

  • :path (String)

    Path to job output

  • :select_field (Symbol)

    Field whose value will be used to select row(s) to test

  • :select_value (String)

    Value that will be matched (using ==) in :select_field to select test row(s)

  • :test_field (Symbol)

    Field to be tested in selected row(s)

  • :select_qualifier (:first, :all)

    Which of the selected rows to test



23
24
25
# File 'lib/kiba/extend/job_test/csv_job/blank.rb', line 23

def initialize(config, job_data = nil)
  initialization_logic(config)
end

Instance Method Details

#descString

Returns:

  • (String)


28
29
30
# File 'lib/kiba/extend/job_test/csv_job/blank.rb', line 28

def desc
  "When #{select_field} is #{select_value}, #{test_field} is blank"
end