Class: Spectus::RequirementLevel::High Private

Inherits:
BasicObject
Defined in:
lib/spectus/requirement_level/high.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.

High requirement level.

Direct Known Subclasses

Medium

Instance Method Summary collapse

Constructor Details

#initialize(definition, negate = false) ⇒ High

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 (Hash)
  • negate (Boolean) (defaults to: false)


14
15
16
17
# File 'lib/spectus/requirement_level/high.rb', line 14

def initialize(definition, negate = false)
  @definition = definition
  @negate     = negate
end

Instance Method Details

#pass?(&actual) ⇒ 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.

Evaluate the expectation with the passed block.

Returns:

  • (Boolean)

    report if the expectation is true or false.



22
23
24
# File 'lib/spectus/requirement_level/high.rb', line 22

def pass?(&actual)
  sandbox(&actual).pass?(@negate)
end