Class: NilClass

Inherits:
Object
  • Object
show all
Defined in:
lib/n/std.rb

Instance Method Summary collapse

Instance Method Details

#empty?Boolean

quite usefull for error tolerant apps. a bit dangerous though.

Returns:

  • (Boolean)


27
28
29
# File 'lib/n/std.rb', line 27

def empty?
	return true
end

#to_fObject



20
21
22
# File 'lib/n/std.rb', line 20

def to_f
	return 0.0
end

#to_iObject

to_i, to_s are handled by default.



16
17
18
# File 'lib/n/std.rb', line 16

def to_i
	return nil
end