Sha256: 668bcbf62f6913b8a92af587a14f3cfabc581c625321becc73fe33b91f545ff7
Contents?: true
Size: 261 Bytes
Versions: 2
Compression:
Stored size: 261 Bytes
Contents
require 'json' require 'tinynews/feed' module TinyNews class JSONExporter def self.export feeds feeds.map do |feed_object| { title: feed_object.title, news: feed_object.stories }.to_json end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tinynews-1.0.3 | lib/tinynews/json_exporter.rb |
tinynews-1.0.2 | lib/tinynews/json_exporter.rb |