Method: Simple2ch::Res.parse
- Defined in:
- lib/simple2ch/res.rb
.parse(res_num, contents, thre = nil) ⇒ Res
Datの1行から各項目を分離して、Resオブジェクトを返す
42 43 44 45 46 47 48 49 50 |
# File 'lib/simple2ch/res.rb', line 42 def self.parse(res_num, contents, thre=nil) unless contents.strip == KAKO_LOG_INFO hash = parse_dat(contents) hash[:thre] = thre if thre return self.new(res_num, hash) else raise KakoLogException end end |