Sha256: f1009fcc9ef1c208a27875314917f11366246ce594a2c09e4f47ead1c658a173
Contents?: true
Size: 475 Bytes
Versions: 1
Compression:
Stored size: 475 Bytes
Contents
require 'hpricot' module Jkl module Rss class << self def items(rss_doc) (rss_doc/:item) end def links(items) items.map{|item| attribute_from(item,:link)} end def descriptions(items) items.map do |item| attribute_from(item, :description).gsub("<![CDATA[","").gsub("]]>","") end end def attribute_from(item, name) (item/name).inner_html end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jakal-0.1.1 | lib/jkl/rss_client.rb |