Module: LibSSH2::Native::Error
- Defined in:
- lib/libssh2/native/error.rb,
ext/libssh2_ruby_c/libssh2_ruby_c.c
Defined Under Namespace
Classes: Generic
Class Method Summary (collapse)
-
+ (Object) error_for_code(code)
Returns an error class for the given numeric code.
Class Method Details
+ (Object) error_for_code(code)
Returns an error class for the given numeric code. If no such error class exists, then the generic class will be returned.
9 10 11 |
# File 'lib/libssh2/native/error.rb', line 9 def self.error_for_code(code) const_get(LIBSSH_ERRORS_BY_CODE[code]) end |