Module: Approximately

Defined in:
lib/approximately.rb

Overview

Include this module into your spec/test case/whatever

Defined Under Namespace

Classes: DeltaFloat

Constant Summary collapse

VERSION =
"1.1.0"
DEFAULT_DELTA =
0.01

Class Method Summary collapse

Class Method Details

.approx(float, delta = DEFAULT_DELTA) ⇒ Object

Returns the passed Float into a DeltaFloat object. The optional second argument is the delta that will be considered sufficient for the comparison to evaluate to true



36
37
38
# File 'lib/approximately.rb', line 36

def approx(float, delta = DEFAULT_DELTA)
  DeltaFloat.new(float, delta)
end