Sha256: 764902411a647c8935eaa617c52b55140ecd518425ad69eee993cecb9ac4e7d6

Contents?: true

Size: 246 Bytes

Versions: 5

Compression:

Stored size: 246 Bytes

Contents

require 'rest-client'

class Fetcher

  def initialize url, headers = nil
    @url = url
    if headers.is_a? Hash
      @headers = headers || {}
    end
  end

  def fetch
    @json = RestClient.get(@url, headers = @headers)
    @json
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
veda-apps-0.0.7 lib/fetcher.rb
veda-apps-0.0.6 lib/fetcher.rb
veda-apps-0.0.5 lib/fetcher.rb
veda-apps-0.0.4 lib/fetcher.rb
veda-apps-0.0.3 lib/fetcher.rb