Class: X2CH::Subject
- Inherits:
-
Object
- Object
- X2CH::Subject
- Defined in:
- lib/x2ch.rb
Class Method Summary collapse
Class Method Details
.download(url) ⇒ Object
197 198 199 |
# File 'lib/x2ch.rb', line 197 def self.download(url) Agent.download(url) end |
.parse(url, subject) ⇒ Object
201 202 203 204 205 206 207 208 209 210 |
# File 'lib/x2ch.rb', line 201 def self.parse(url, subject) threads = [] subject.each_line{|l| m = l.match(/^(\d+\.(?:dat|cgi))(?:<>|,)(.+)\((\d+)\)$/).to_a if m[0] threads << Thread.new(url, m[1], m[2], m[3].to_i) end } threads end |