Module: NillishConversions
- Included in:
- VoidClass
- Defined in:
- lib/null.rb
Overview
An object including us will convert like nil
.
Instance Method Summary collapse
-
#=~(obj) ⇒ Object
nil
. -
#to_a ⇒ Object
(also: #to_ary)
[]
. -
#to_c ⇒ Object
(00i)+.
-
#to_f ⇒ Object
0.0
. -
#to_i ⇒ Object
0
. -
#to_json ⇒ Object
“null”.
-
#to_nil? ⇒ Boolean
nil
. -
#to_param ⇒ Object
nil
. -
#to_r ⇒ Object
(also: #rationalize)
(0/1).
-
#to_s ⇒ Object
(also: #to_str)
“”.
Instance Method Details
#to_nil? ⇒ Boolean
nil
93 |
# File 'lib/null.rb', line 93 def to_nil?() nil end |
#to_r ⇒ Object Also known as: rationalize
(0/1)
99 |
# File 'lib/null.rb', line 99 def to_r() to_i.to_r end |