Class: Int

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

Class Method Summary collapse

Class Method Details

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

Examples:

Value must be a Integer and > 2

rtype [Int > 2] => Any

Parameters:

  • x (Numeric)

Returns:



113
114
115
# File 'lib/rtype/behavior/core_ext.rb', line 113

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

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

Examples:

Value must be a Integer and > 2

rtype [Int > 2] => Any

Parameters:

  • x (Numeric)

Returns:



121
122
123
# File 'lib/rtype/behavior/core_ext.rb', line 121

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

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

Examples:

Value must be a Integer and > 2

rtype [Int > 2] => Any

Parameters:

  • x (Numeric)

Returns:



129
130
131
# File 'lib/rtype/behavior/core_ext.rb', line 129

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

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

Examples:

Value must be a Integer and > 2

rtype [Int > 2] => Any

Parameters:

  • x (Numeric)

Returns:



97
98
99
# File 'lib/rtype/behavior/core_ext.rb', line 97

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

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

Examples:

Value must be a Integer and > 2

rtype [Int > 2] => Any

Parameters:

  • x (Numeric)

Returns:



105
106
107
# File 'lib/rtype/behavior/core_ext.rb', line 105

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