Class: NntpScrape::LongCommand
- Inherits:
-
ShortCommand
- Object
- NNTPCommand
- ShortCommand
- NntpScrape::LongCommand
- Defined in:
- lib/nntp_scrape/nntp_command.rb
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
Attributes inherited from NNTPCommand
Instance Method Summary collapse
Methods inherited from NNTPCommand
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
27 28 29 |
# File 'lib/nntp_scrape/nntp_command.rb', line 27 def lines @lines end |
Instance Method Details
#execute(client) ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/nntp_scrape/nntp_command.rb', line 29 def execute(client) super client @lines = [] loop do next_line = socket.gets break if next_line.strip == "." @lines << next_line end end |