Class: Kiba::Extend::JobTest::TestPrepper

Inherits:
Object
  • Object
show all
Defined in:
lib/kiba/extend/job_test/test_prepper.rb

Instance Method Summary collapse

Constructor Details

#initialize(nodes) ⇒ TestPrepper

Returns a new instance of TestPrepper.

Parameters:

  • nodes (Array<Psych::Nodes::Mapping>)


8
9
10
11
# File 'lib/kiba/extend/job_test/test_prepper.rb', line 8

def initialize(nodes)
  @yml = nodes.children
  @config = {srcline: yml.first.start_line + 1}
end

Instance Method Details

#callHash

Returns:

  • (Hash)


14
15
16
17
# File 'lib/kiba/extend/job_test/test_prepper.rb', line 14

def call
  add_to_config until yml.empty?
  config
end