Class: NntpScrape::Commands::Capabilities
- Defined in:
- lib/nntp_scrape/commands/capabilities.rb
Instance Attribute Summary collapse
-
#caps ⇒ Object
readonly
Returns the value of attribute caps.
Attributes inherited from Base
#lines, #response, #status_line, #timeout
Instance Method Summary collapse
- #execute(client) ⇒ Object
-
#initialize ⇒ Capabilities
constructor
A new instance of Capabilities.
Methods inherited from Base
#continue?, #ran?, #run_long, #run_short, #status_code, #success?, supported?
Constructor Details
#initialize ⇒ Capabilities
Returns a new instance of Capabilities.
6 7 8 |
# File 'lib/nntp_scrape/commands/capabilities.rb', line 6 def initialize @caps = [] end |
Instance Attribute Details
#caps ⇒ Object (readonly)
Returns the value of attribute caps.
4 5 6 |
# File 'lib/nntp_scrape/commands/capabilities.rb', line 4 def caps @caps end |
Instance Method Details
#execute(client) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/nntp_scrape/commands/capabilities.rb', line 10 def execute(client) run_long client, "CAPABILITIES" return unless success? @caps = lines end |