Class: Net::NNTP::Group
- Inherits:
-
Object
- Object
- Net::NNTP::Group
- Defined in:
- lib/net/nntp/group.rb
Defined Under Namespace
Classes: Articles
Instance Attribute Summary collapse
-
#article_count ⇒ Object
readonly
Returns the value of attribute article_count.
-
#article_first ⇒ Object
readonly
Returns the value of attribute article_first.
-
#article_last ⇒ Object
readonly
Returns the value of attribute article_last.
-
#hi ⇒ Object
readonly
Returns the value of attribute hi.
-
#lo ⇒ Object
readonly
Returns the value of attribute lo.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#postingmode ⇒ Object
readonly
Returns the value of attribute postingmode.
Instance Method Summary collapse
-
#article_info=(art_array) ⇒ Object
Set article_count, article_first, article_last (from GROUP command).
- #articles ⇒ Object
- #articles=(articles) ⇒ Object
-
#initialize(name) ⇒ Group
constructor
A new instance of Group.
- #inspect ⇒ Object
-
#listinfo(hi, lo, postingmode) ⇒ Object
Sets hi and lo watermark alont with postingmode (from LIST ACTIVE command).
Constructor Details
Instance Attribute Details
#article_count ⇒ Object (readonly)
Returns the value of attribute article_count.
6 7 8 |
# File 'lib/net/nntp/group.rb', line 6 def article_count @article_count end |
#article_first ⇒ Object (readonly)
Returns the value of attribute article_first.
6 7 8 |
# File 'lib/net/nntp/group.rb', line 6 def article_first @article_first end |
#article_last ⇒ Object (readonly)
Returns the value of attribute article_last.
6 7 8 |
# File 'lib/net/nntp/group.rb', line 6 def article_last @article_last end |
#hi ⇒ Object (readonly)
Returns the value of attribute hi.
7 8 9 |
# File 'lib/net/nntp/group.rb', line 7 def hi @hi end |
#lo ⇒ Object (readonly)
Returns the value of attribute lo.
7 8 9 |
# File 'lib/net/nntp/group.rb', line 7 def lo @lo end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/net/nntp/group.rb', line 6 def name @name end |
#postingmode ⇒ Object (readonly)
Returns the value of attribute postingmode.
7 8 9 |
# File 'lib/net/nntp/group.rb', line 7 def postingmode @postingmode end |
Instance Method Details
#article_info=(art_array) ⇒ Object
Set article_count, article_first, article_last (from GROUP command)
Takes an array [count, first, last] as argument
19 20 21 22 23 |
# File 'lib/net/nntp/group.rb', line 19 def article_info=(art_array) @article_count = art_array[0].to_i @article_first = art_array[1].to_i @article_last = art_array[2].to_i end |
#articles ⇒ Object
25 26 27 |
# File 'lib/net/nntp/group.rb', line 25 def articles @articles end |
#articles=(articles) ⇒ Object
29 30 31 |
# File 'lib/net/nntp/group.rb', line 29 def articles=(articles) @articles = articles end |
#inspect ⇒ Object
40 41 42 |
# File 'lib/net/nntp/group.rb', line 40 def inspect "Group: #{@name} #{@article_count} #{@article_first} #{@article_last}" end |
#listinfo(hi, lo, postingmode) ⇒ Object
Sets hi and lo watermark alont with postingmode (from LIST ACTIVE command)
34 35 36 37 38 |
# File 'lib/net/nntp/group.rb', line 34 def listinfo(hi, lo, postingmode) @hi = hi @lo = lo @postingmode = postingmode end |