Class: NntpScrape::Commands::Capabilities

Inherits:
Base
  • Object
show all
Defined in:
lib/nntp_scrape/commands/capabilities.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#lines, #response, #status_line, #timeout

Instance Method Summary collapse

Methods inherited from Base

#continue?, #ran?, #run_long, #run_short, #status_code, #success?, supported?

Constructor Details

#initializeCapabilities

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

#capsObject (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