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.

Direct Known Subclasses

High, Low, Medium

Instance Method Summary collapse

Constructor Details

#initialize(definition, negate, subject, challenge) ⇒ 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:

  • definition (Array, Hash, Symbol)

    The definition of the expected value.

  • negate (Boolean)

    Evaluate to a negative assertion.

  • subject (#object_id)

    the front object to test.

  • challenge (Challenge)

    a challenge for the subject.



21
22
23
24
25
26
# File 'lib/spectus/level/base.rb', line 21

def initialize(definition, negate, subject, challenge)
  @definition = definition
  @negate     = negate
  @subject    = subject
  @challenge  = challenge
end