Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
C:/Program Files/Relyze/lib/relyze/core.rb

Instance Method Summary collapse

Instance Method Details

#to_boolObject

Raises:

  • (::ArgumentError)


17
18
19
20
21
22
23
24
# File 'C:/Program Files/Relyze/lib/relyze/core.rb', line 17

def to_bool
	if( self == 1 )
		return true
	elsif( self == 0 )
		return false
	end
	raise ::ArgumentError.new( "Invalid boolean value %d" % self )
end