Class: ONCCertificationG10TestKit::Tasks::TestProcedure::Section

Inherits:
Object
  • Object
show all
Defined in:
lib/onc_certification_g10_test_kit/tasks/test_procedure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Section

Returns a new instance of Section.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/onc_certification_g10_test_kit/tasks/test_procedure.rb', line 16

def initialize(data)
  @name = data[:section]

  group = nil
  @steps = data[:steps].map do |step|
    if step[:group].nil?
      step[:group] = group
    else
      group = step[:group]
    end

    Step.new(step)
  end
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/onc_certification_g10_test_kit/tasks/test_procedure.rb', line 14

def name
  @name
end

#stepsObject

Returns the value of attribute steps.



14
15
16
# File 'lib/onc_certification_g10_test_kit/tasks/test_procedure.rb', line 14

def steps
  @steps
end