Class: MobyController::SutAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/tdriver/base/sut/adapter.rb

Overview

Abstract class SutAdapter. Not supposed to be instantiated as is

Instance Method Summary collapse

Instance Method Details

#add_hook(id, &block) ⇒ Object

Raises:

  • (ArgumentError)


26
27
28
29
30
31
32
# File 'lib/tdriver/base/sut/adapter.rb', line 26

def add_hook( id, &block )

  raise ArgumentError, 'Unable to add hook due to no block was given' unless block_given?
		@hooks = {} unless @hooks
  @hooks[ id ] = block

end