class RubygemsDownloads::Stats::Gem

Public Instance Methods

call() click to toggle source
Calls superclass method RubygemsDownloads::Stats::Base#call
# File lib/rubygems_downloads/stats/gem.rb, line 6
def call
  response = super

  return invalid_response_return_value if response.nil?

  RubygemsDownloads::Gem.from_json(response)
end

Protected Instance Methods

endpoint() click to toggle source
# File lib/rubygems_downloads/stats/gem.rb, line 20
def endpoint
  "https://rubygems.org/api/v1/gems/#{placeholder}.json"
end
invalid_response_return_value() click to toggle source
# File lib/rubygems_downloads/stats/gem.rb, line 24
def invalid_response_return_value
  nil
end
placeholder() click to toggle source
# File lib/rubygems_downloads/stats/gem.rb, line 16
def placeholder
  '#|GEM_NAME|#'
end