Class: Spectus::RequirementLevel::Base Private

Inherits:
Object
  • Object
show all
Defined in:
lib/spectus/level/base.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Requirement level’s base class.

API:

  • private

Direct Known Subclasses

High, Low, Medium

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(req, negate, subject, *challenges) ⇒ Base

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize the requirement level class.

Parameters:

  • The definition of the expected value.

  • Evaluate to a negative assertion.

  • The front object to test.

  • A list of challenges.

API:

  • private



16
17
18
19
20
21
# File 'lib/spectus/level/base.rb', line 16

def initialize(req, negate, subject, *challenges)
  @req        = req
  @negate     = negate
  @subject    = subject
  @challenges = challenges
end

Instance Attribute Details

#challengesArray (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns A list of challenges.

Returns:

  • A list of challenges.

API:

  • private



43
44
45
# File 'lib/spectus/level/base.rb', line 43

def challenges
  @challenges
end

#reqHash, Symbol (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns The definition of the expected value.

Returns:

  • The definition of the expected value.

API:

  • private



26
27
28
# File 'lib/spectus/level/base.rb', line 26

def req
  @req
end

#subject#object_id (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns The front object to test.

Returns:

  • The front object to test.

API:

  • private



38
39
40
# File 'lib/spectus/level/base.rb', line 38

def subject
  @subject
end

Instance Method Details

#negate?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The value of the negate instance variable.

Returns:

  • Evaluated to a negative assertion or not.

API:

  • private



31
32
33
# File 'lib/spectus/level/base.rb', line 31

def negate?
  @negate
end