Class: Newsgroups
Constant Summary collapse
- @@config =
class-level configuration object
Configuration.instance
- @@log =
Class-level logger as configured
init_logger(@@config.log_target, @@config.log_level)
Instance Attribute Summary collapse
-
#groups ⇒ Object
readonly
Returns the value of attribute groups.
-
#intro ⇒ Object
readonly
Returns the value of attribute intro.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#xnay ⇒ Object
readonly
Returns the value of attribute xnay.
Instance Method Summary collapse
-
#initialize(groups) ⇒ Newsgroups
constructor
A new instance of Newsgroups.
Methods included from Logging
init_logger, log_level=, log_target=
Constructor Details
#initialize(groups) ⇒ Newsgroups
Returns a new instance of Newsgroups.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/newsgroups.rb', line 37 def initialize(groups) @log = @@log @groups = groups.split(',') # set details for this post, unless disabled by the # currently unused parameter-header. unless @groups.size != 1 # configuration options are never set. All # actions are performed. set_signature unless @@config.no_sig set_intro unless @@config.no_intro set_xnay unless @@config.no_xnay end end |
Instance Attribute Details
#groups ⇒ Object (readonly)
Returns the value of attribute groups.
53 54 55 |
# File 'lib/newsgroups.rb', line 53 def groups @groups end |
#intro ⇒ Object (readonly)
Returns the value of attribute intro.
53 54 55 |
# File 'lib/newsgroups.rb', line 53 def intro @intro end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
53 54 55 |
# File 'lib/newsgroups.rb', line 53 def signature @signature end |
#xnay ⇒ Object (readonly)
Returns the value of attribute xnay.
53 54 55 |
# File 'lib/newsgroups.rb', line 53 def xnay @xnay end |