Sha256: 8a41d5726671dc224b3d58dfe638329e410ac773272d94c2b3108cad40f05052
Contents?: true
Size: 481 Bytes
Versions: 14
Compression:
Stored size: 481 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
14 entries across 14 versions & 1 rubygems