Class: Thoreau::Model::TestClan

Inherits:
Object
  • Object
show all
Includes:
Logging
Defined in:
lib/thoreau/model/test_clan.rb

Overview

set of TestFamilies

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Logging

included, logger, #logger

Constructor Details

#initialize(name, appendix:, action_block: nil) ⇒ TestClan

Returns a new instance of TestClan.



17
18
19
20
21
22
# File 'lib/thoreau/model/test_clan.rb', line 17

def initialize(name, appendix:, action_block: nil)
  @name          = name
  @test_families = []
  @appendix      = appendix
  @action_block  = action_block
end

Instance Attribute Details

#action_blockObject

Returns the value of attribute action_block.



13
14
15
# File 'lib/thoreau/model/test_clan.rb', line 13

def action_block
  @action_block
end

#appendixObject

Returns the value of attribute appendix.



12
13
14
# File 'lib/thoreau/model/test_clan.rb', line 12

def appendix
  @appendix
end

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'lib/thoreau/model/test_clan.rb', line 13

def name
  @name
end

#test_familiesObject

Returns the value of attribute test_families.



12
13
14
# File 'lib/thoreau/model/test_clan.rb', line 12

def test_families
  @test_families
end

Instance Method Details

#add_test_family(fam) ⇒ Object



29
30
31
32
33
34
# File 'lib/thoreau/model/test_clan.rb', line 29

def add_test_family fam
  logger.debug "   + Adding test family #{fam}"
  fam.desc = self.name if fam.desc.blank?
  @test_families.push fam
  fam
end