Top Level Namespace
Defined Under Namespace
Modules: BigMath, Diggable, Enumerable, Kernel, Math Classes: Array, Complex, Enumerator, Exception, Float, FragileMethodChain, Hash, Integer, Iterator, MatchData, MaybeDelegator, Method, Module, Numeric, Object, Proc, Range, Regexp, String, Time
Class Method Summary collapse
Instance Method Summary collapse
-
#Bool(arg) ⇒ Boolean
Converts arg to a boolean (true or false).
Class Method Details
.to_b ⇒ Object
64 |
# File 'lib/mug/bool.rb', line 64 def nil.to_b; false; end |
.to_bool ⇒ Object
63 |
# File 'lib/mug/bool.rb', line 63 def nil.to_bool; false; end |
Instance Method Details
#Bool(arg) ⇒ Boolean
Converts arg to a boolean (true or false).
Returns the truthiness of obj, as either true or false.
This is functionally equivalent to calling !!arg.
17 18 19 |
# File 'lib/mug/bool.rb', line 17 def Bool(arg) !!arg end |