Module: Contextual::Child

Included in:
Group, Test
Defined in:
lib/contextual/child.rb

Overview

A Child is a Node that has a parent

Instance Method Summary collapse

Instance Method Details

#assign_parent(parent_options) ⇒ Object

Handles assigning parent information to child

Parameters:

  • parent_options (TestOptions)

    Options from parent to copy to child



12
13
14
15
16
17
18
# File 'lib/contextual/child.rb', line 12

def assign_parent(parent_options)
  @parent_count = 0 if @parent_count.nil?
  @parent_count += 1

  @options = TestOptions.new if @options.nil?
  @options.map_from_parent(parent_options)
end