Class: Num

Inherits:
Object show all
Defined in:
lib/rtype/behavior/core_ext.rb

Class Method Summary collapse

Class Method Details

.<(x) ⇒ Rtype::Behavior::NumericCheck

Examples:

Value must be a Numeric and > 2

rtype [Num > 2] => Any

Parameters:

  • x (Numeric)

Returns:



71
72
73
# File 'lib/rtype/behavior/core_ext.rb', line 71

def self.<(x)
	::Rtype::Behavior::NumericCheck.new(:<, x)
end

.<=(x) ⇒ Rtype::Behavior::NumericCheck

Examples:

Value must be a Numeric and > 2

rtype [Num > 2] => Any

Parameters:

  • x (Numeric)

Returns:



79
80
81
# File 'lib/rtype/behavior/core_ext.rb', line 79

def self.<=(x)
	::Rtype::Behavior::NumericCheck.new(:<=, x)
end

.==(x) ⇒ Rtype::Behavior::NumericCheck

Examples:

Value must be a Numeric and > 2

rtype [Num > 2] => Any

Parameters:

  • x (Numeric)

Returns:



87
88
89
# File 'lib/rtype/behavior/core_ext.rb', line 87

def self.==(x)
	::Rtype::Behavior::NumericCheck.new(:==, x)
end

.>(x) ⇒ Rtype::Behavior::NumericCheck

Examples:

Value must be a Numeric and > 2

rtype [Num > 2] => Any

Parameters:

  • x (Numeric)

Returns:



55
56
57
# File 'lib/rtype/behavior/core_ext.rb', line 55

def self.>(x)
	::Rtype::Behavior::NumericCheck.new(:>, x)
end

.>=(x) ⇒ Rtype::Behavior::NumericCheck

Examples:

Value must be a Numeric and > 2

rtype [Num > 2] => Any

Parameters:

  • x (Numeric)

Returns:



63
64
65
# File 'lib/rtype/behavior/core_ext.rb', line 63

def self.>=(x)
	::Rtype::Behavior::NumericCheck.new(:>=, x)
end