Class: Newsgroups

Inherits:
Object
  • Object
show all
Extended by:
Logging
Defined in:
lib/newsgroups.rb

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

Instance Method Summary collapse

Methods included from Logging

init_logger, log_level=, log_target=

Constructor Details

#initialize(groups) ⇒ Newsgroups

Returns a new instance of Newsgroups.



29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/newsgroups.rb', line 29

def initialize(groups)
  @log = @@log

  @groups = groups.split(',')
  @log.debug('set signature, intro, xnay')
  # set details for this post
  if @groups.size == 1
    set_signature
    set_intro 
    set_xnay 
  end
end

Instance Attribute Details

#groupsObject (readonly)

Returns the value of attribute groups.



46
47
48
# File 'lib/newsgroups.rb', line 46

def groups
  @groups
end

#introObject (readonly)

Returns the value of attribute intro.



46
47
48
# File 'lib/newsgroups.rb', line 46

def intro
  @intro
end

#signatureObject (readonly)

Returns the value of attribute signature.



46
47
48
# File 'lib/newsgroups.rb', line 46

def signature
  @signature
end

Instance Method Details

#xnayObject



42
43
44
45
# File 'lib/newsgroups.rb', line 42

def xnay
  @log.debug('returning ' <<( @xnay ? @xnay : ' nil ') )
  return @xnay ? @xnay : nil 
end