Module: Ronin::Network::Mixins::IMAP
Overview
Adds IMAP convenience methods and connection parameters to a class.
Defines the following parameters:
host(String) - IMAP host.port(Integer) - IMAP port.imap_auth(String) - IMAP authentication method.imap_user(String) - IMAP user to login as.imap_password(String) - IMAP password to login with.
Constant Summary
Constant Summary
Constants included from IMAP
Class Method Summary (collapse)
-
+ (Object) host
IMAP host.
-
+ (Object) host=(value)
IMAP host.
-
+ (Object) imap_auth
IMAP auth.
-
+ (Object) imap_auth=(value)
IMAP auth.
-
+ (Object) imap_password
IMAP password to login with.
-
+ (Object) imap_password=(value)
IMAP password to login with.
-
+ (Object) imap_user
IMAP user to login as.
-
+ (Object) imap_user=(value)
IMAP user to login as.
-
+ (Object) port
IMAP port.
-
+ (Object) port=(value)
IMAP port.
Instance Method Summary (collapse)
-
- (Object) host
IMAP host.
-
- (Object) host=(value)
IMAP host.
-
- (Object) imap_auth
IMAP auth.
-
- (Object) imap_auth=(value)
IMAP auth.
-
- (Object) imap_connect(options = {}, &block)
protected
Creates a connection to the IMAP server.
-
- (Object) imap_password
IMAP password to login with.
-
- (Object) imap_password=(value)
IMAP password to login with.
-
- (Object) imap_session(options = {}) {|session| ... }
protected
Starts a session with the IMAP server.
-
- (Object) imap_user
IMAP user to login as.
-
- (Object) imap_user=(value)
IMAP user to login as.
-
- (Object) port
IMAP port.
-
- (Object) port=(value)
IMAP port.
Methods included from Mixin
Methods included from IMAP
Class Method Details
+ (Object) host
IMAP host
41 42 |
# File 'lib/ronin/network/mixins/imap.rb', line 41 parameter :host, :type => String, :description => 'IMAP host' |
+ (Object) host=(value)
IMAP host
41 42 |
# File 'lib/ronin/network/mixins/imap.rb', line 41 parameter :host, :type => String, :description => 'IMAP host' |
+ (Object) imap_auth
IMAP auth
49 50 |
# File 'lib/ronin/network/mixins/imap.rb', line 49 parameter :imap_auth, :type => String, :description => 'IMAP authentication method' |
+ (Object) imap_auth=(value)
IMAP auth
49 50 |
# File 'lib/ronin/network/mixins/imap.rb', line 49 parameter :imap_auth, :type => String, :description => 'IMAP authentication method' |
+ (Object) imap_password
IMAP password to login with
57 58 |
# File 'lib/ronin/network/mixins/imap.rb', line 57 parameter :imap_password, :type => String, :description => 'IMAP password to login with' |
+ (Object) imap_password=(value)
IMAP password to login with
57 58 |
# File 'lib/ronin/network/mixins/imap.rb', line 57 parameter :imap_password, :type => String, :description => 'IMAP password to login with' |
+ (Object) imap_user
IMAP user to login as
53 54 |
# File 'lib/ronin/network/mixins/imap.rb', line 53 parameter :imap_user, :type => String, :description => 'IMAP user to login as' |
+ (Object) imap_user=(value)
IMAP user to login as
53 54 |
# File 'lib/ronin/network/mixins/imap.rb', line 53 parameter :imap_user, :type => String, :description => 'IMAP user to login as' |
+ (Object) port
IMAP port
45 46 |
# File 'lib/ronin/network/mixins/imap.rb', line 45 parameter :port, :type => Integer, :description => 'IMAP port' |
+ (Object) port=(value)
IMAP port
45 46 |
# File 'lib/ronin/network/mixins/imap.rb', line 45 parameter :port, :type => Integer, :description => 'IMAP port' |
Instance Method Details
- (Object) host
IMAP host
41 42 |
# File 'lib/ronin/network/mixins/imap.rb', line 41 parameter :host, :type => String, :description => 'IMAP host' |
- (Object) host=(value)
IMAP host
41 42 |
# File 'lib/ronin/network/mixins/imap.rb', line 41 parameter :host, :type => String, :description => 'IMAP host' |
- (Object) imap_auth
IMAP auth
49 50 |
# File 'lib/ronin/network/mixins/imap.rb', line 49 parameter :imap_auth, :type => String, :description => 'IMAP authentication method' |
- (Object) imap_auth=(value)
IMAP auth
49 50 |
# File 'lib/ronin/network/mixins/imap.rb', line 49 parameter :imap_auth, :type => String, :description => 'IMAP authentication method' |
- (Object) imap_connect(options = {}, &block) (protected)
Creates a connection to the IMAP server. The host, port,
imap_auth, imap_user and imap_password parameters
will also be used to make the connection.
95 96 97 98 99 |
# File 'lib/ronin/network/mixins/imap.rb', line 95 def imap_connect(={},&block) print_info "Connecting to #{host_port} ..." return super(self.host,(),&block) end |
- (Object) imap_password
IMAP password to login with
57 58 |
# File 'lib/ronin/network/mixins/imap.rb', line 57 parameter :imap_password, :type => String, :description => 'IMAP password to login with' |
- (Object) imap_password=(value)
IMAP password to login with
57 58 |
# File 'lib/ronin/network/mixins/imap.rb', line 57 parameter :imap_password, :type => String, :description => 'IMAP password to login with' |
- (Object) imap_session(options = {}) {|session| ... } (protected)
Starts a session with the IMAP server. The host, port,
imap_auth, imap_user and imap_password parameters
will also be used to make the connection.
118 119 120 121 122 123 124 125 126 127 |
# File 'lib/ronin/network/mixins/imap.rb', line 118 def imap_session(={}) super(()) do |sess| yield sess if block_given? print_info "Logging out ..." end print_info "Disconnected from #{host_port}" return il end |
- (Object) imap_user
IMAP user to login as
53 54 |
# File 'lib/ronin/network/mixins/imap.rb', line 53 parameter :imap_user, :type => String, :description => 'IMAP user to login as' |
- (Object) imap_user=(value)
IMAP user to login as
53 54 |
# File 'lib/ronin/network/mixins/imap.rb', line 53 parameter :imap_user, :type => String, :description => 'IMAP user to login as' |
- (Object) port
IMAP port
45 46 |
# File 'lib/ronin/network/mixins/imap.rb', line 45 parameter :port, :type => Integer, :description => 'IMAP port' |
- (Object) port=(value)
IMAP port
45 46 |
# File 'lib/ronin/network/mixins/imap.rb', line 45 parameter :port, :type => Integer, :description => 'IMAP port' |