Class: BareTest::Setup

Inherits:
Struct
  • Object
show all
Defined in:
lib/baretest/setup.rb

Overview

Encapsulates a single setup block and associated information. Relevant for setup variants.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



12
13
14
# File 'lib/baretest/setup.rb', line 12

def block
  @block
end

#componentObject

Returns the value of attribute component

Returns:

  • (Object)

    the current value of component



12
13
14
# File 'lib/baretest/setup.rb', line 12

def component
  @component
end

#substituteObject

Returns the value of attribute substitute

Returns:

  • (Object)

    the current value of substitute



12
13
14
# File 'lib/baretest/setup.rb', line 12

def substitute
  @substitute
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



12
13
14
# File 'lib/baretest/setup.rb', line 12

def value
  @value
end

Instance Method Details

#inspectObject



13
14
15
# File 'lib/baretest/setup.rb', line 13

def inspect
  sprintf "#<Setup component=%s substitute=%p value=%p>", component, substitute, value
end