Class: Exemplor::Assert

Inherits:
Check
  • Object
show all
Defined in:
lib/checker.rb

Defined Under Namespace

Classes: Failure

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Check

#[], #failure?, #info?, #initialize, #is, #name, #success?

Constructor Details

This class inherits a constructor from Exemplor::Check

Instance Attribute Details

#statusObject (readonly)

Returns the value of attribute status.



48
49
50
# File 'lib/checker.rb', line 48

def status
  @status
end

#valueObject (readonly)

todo remove



51
52
53
# File 'lib/checker.rb', line 51

def value
  @value
end

Instance Method Details

#runObject

Raises:



56
57
58
59
# File 'lib/checker.rb', line 56

def run
  @status = !!@value ? :success : :failure
  raise Failure if failure?
end