Module: NNTP
- Defined in:
- lib/nntp.rb,
lib/nntp/group.rb,
lib/nntp/status.rb,
lib/nntp/article.rb,
lib/nntp/session.rb,
lib/nntp/version.rb,
lib/nntp/connection.rb,
lib/nntp/ssl_connection.rb
Overview
The main entry point for this module is the open method.
::open returns an object that is an active NNTP session. If a block is passed to it, the session object is made available therein.
Defined Under Namespace
Classes: Article, Connection, Group, SSLConnection, Session, Status
Constant Summary collapse
- VERSION =
"0.0.6"
Class Method Summary collapse
-
.open(options) ⇒ NNTP::Session
The main entrypoint to the module.
Class Method Details
.open(options) ⇒ NNTP::Session
The main entrypoint to the module.
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/nntp.rb', line 31 def self.open() if [:ssl] connection = SSLConnection.new() else connection = Connection.new() end session = Session.new(:connection => connection) session.auth([:auth]) if [:auth] if block_given? yield session session.quit else session end end |