Module: Net::IMAP::Utils
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Extended In:
| |
|
Included In:
| |
| Defined in: | lib/net/imap/utils.rb |
Overview
INTERNAL utility methods. API is unstable and subject to change.
Class Method Summary
-
.implicit_int(input)
mod_func
Internal use only
Something like this exists in ruby's C API.
-
.shareable(&b)
mod_func
Internal use only
simplecov:disable.
Class Method Details
.implicit_int(input) (mod_func)
This method is for internal use only.
Something like this exists in ruby's C API. Why not in ruby's ruby?
# File 'lib/net/imap/utils.rb', line 14
def implicit_int(input) Integer.try_convert(input) or raise TypeError, case input when nil "no implicit conversion from %p to Integer" % [input] when true, false "no implicit conversion of %p into Integer" % [input] else "no implicit conversion of %s into Integer" % [input.class.name] end end