Class: Pipe::Source::JSONFeed

Inherits:
Object
  • Object
show all
Defined in:
lib/pipe/source/json_feed.rb

Direct Known Subclasses

Input::HackerNews

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ JSONFeed

Returns a new instance of JSONFeed.



2
3
4
# File 'lib/pipe/source/json_feed.rb', line 2

def initialize(options={})
  @options = options
end

Instance Method Details

#getObject



6
7
8
# File 'lib/pipe/source/json_feed.rb', line 6

def get
  ActiveSupport::JSON.decode(open(@options[:url]).read)
end