Class: NntpScrape::NNTPCommand
- Inherits:
-
Object
- Object
- NntpScrape::NNTPCommand
- Defined in:
- lib/nntp_scrape/nntp_command.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status_line ⇒ Object
readonly
Returns the value of attribute status_line.
Instance Method Summary collapse
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/nntp_scrape/nntp_command.rb', line 3 def response @response end |
#status_line ⇒ Object (readonly)
Returns the value of attribute status_line.
3 4 5 |
# File 'lib/nntp_scrape/nntp_command.rb', line 3 def status_line @status_line end |
Instance Method Details
#execute(client) ⇒ Object
13 14 15 |
# File 'lib/nntp_scrape/nntp_command.rb', line 13 def execute(client) raise "implement in subclass" end |
#status_code ⇒ Object
9 10 11 |
# File 'lib/nntp_scrape/nntp_command.rb', line 9 def status_code @status_code ||= status_line.split.first end |
#success? ⇒ Boolean
5 6 7 |
# File 'lib/nntp_scrape/nntp_command.rb', line 5 def success? status_code[0] == "2" end |