Module: AUOM::Relational

Included in:
Unit
Defined in:
lib/auom/relational.rb

Overview

Mixin to add relational operators

Instance Method Summary collapse

Instance Method Details

#greater_than?(other) ⇒ true, false

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.

Test if unit is greater than other

Parameters:

Returns:

  • (true)

    if unit is greater than other

  • (false)

    otherwise



68
69
70
# File 'lib/auom/relational.rb', line 68

def greater_than?(other)
  relational_operation(other, :>)
end

#greater_than_or_equal_to?(other) ⇒ true, false Also known as: >=

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.

Test if unit is greater than or equal to other

Parameters:

Returns:

  • (true)

    if unit is greater than other

  • (false)

    otherwise



34
35
36
# File 'lib/auom/relational.rb', line 34

def greater_than_or_equal_to?(other)
  relational_operation(other, :>=)
end

#less_than?(other) ⇒ true, false Also known as: <

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.

Test if unit is less than other

Parameters:

Returns:

  • (true)

    if unit is less than other

  • (false)

    otherwise



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

def less_than?(other)
  relational_operation(other, :<)
end

#less_than_or_equal_to?(other) ⇒ true, false Also known as: <=

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.

Test if unit is less than or equal to other

Parameters:

Returns:

  • (true)

    if unit is less than other

  • (false)

    otherwise



17
18
19
# File 'lib/auom/relational.rb', line 17

def less_than_or_equal_to?(other)
  relational_operation(other, :<=)
end