Class: Boundary

Inherits:
Struct
  • Object
show all
Defined in:
lib/math_demo/triangle_point.rb

Overview

we are looking for excluded values

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#lowerObject

Returns the value of attribute lower

Returns:

  • (Object)

    the current value of lower



41
42
43
# File 'lib/math_demo/triangle_point.rb', line 41

def lower
  @lower
end

#upperObject

Returns the value of attribute upper

Returns:

  • (Object)

    the current value of upper



41
42
43
# File 'lib/math_demo/triangle_point.rb', line 41

def upper
  @upper
end

Instance Method Details

#exclude?(val) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/math_demo/triangle_point.rb', line 42

def exclude?(val)
  true unless (lower...upper).cover? val
end