Module: Dashing::Downloader

Extended by:
Downloader
Included in:
Downloader
Defined in:
lib/dashing/downloader.rb

Instance Method Summary collapse

Instance Method Details

#get_gist(gist_id) ⇒ Object



9
10
11
# File 'lib/dashing/downloader.rb', line 9

def get_gist(gist_id)
  get_json("https://api.github.com/gists/#{gist_id}")
end

#get_json(url) ⇒ Object



13
14
15
16
# File 'lib/dashing/downloader.rb', line 13

def get_json(url)
  response = open(url).read
  JSON.parse(response)
end