Class: Shields::Badge::Downloads::GemDownloadRank

Inherits:
Base
  • Object
show all
Defined in:
lib/shields/badge/downloads/gem_download_rank.rb

Overview

Shield for RubyGem total downloads

See: https://shields.io/badges/gem-download-rank

Defined Under Namespace

Classes: PathDto, QueryDto

Constant Summary

Constants inherited from Base

Base::BASE_URL, Base::HTTP_METHOD

Instance Attribute Summary

Attributes inherited from Base

#anchor_href, #anchor_params, #image_type, #label, #path_parameters, #query_parameters

Class Method Summary collapse

Methods inherited from Base

anchor_href_url, #format, img_src_url, #initialize, label_text

Constructor Details

This class inherits a constructor from Shields::Badge::Base

Class Method Details

.anchor_href_templateObject



32
33
34
# File 'lib/shields/badge/downloads/gem_download_rank.rb', line 32

def anchor_href_template
  "https://rubygems.org/gems/%{gem}"
end

.api_templateObject

Formatted string specification template
See: https://ruby-doc.org/3.4.1/String.html#method-i-25



28
29
30
# File 'lib/shields/badge/downloads/gem_download_rank.rb', line 28

def api_template
  "/gem/%{period}/%{gem}"
end

.label_text_templateObject



36
37
38
# File 'lib/shields/badge/downloads/gem_download_rank.rb', line 36

def label_text_template
  "RubyGems Download Rank"
end