Sha256: 570f861f3fb58c3bf63e76a5c1ec4fd89c20a1c69191c50ccecf37aeaeb5a981
Contents?: true
Size: 451 Bytes
Versions: 1
Compression:
Stored size: 451 Bytes
Contents
module Onebox module Engine class StackExchangeOnebox include Engine include HTML matches do http domain("stackoverflow") tld("com") with("/questions/") end private def data { url: @url, title: raw.css(".question-hyperlink").inner_text, question: raw.css(".question .post-text p").first.inner_text } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
onebox-1.1.0 | lib/onebox/engine/stack_exchange_onebox.rb |