Class: Jekyll::FDroidRepoInfoTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::FDroidRepoInfoTag
- Defined in:
- lib/jekyll/FDroidRepoInfoTag.rb
Overview
Used to output the repo name/timestamp used to generate this F-Droid site.
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ FDroidRepoInfoTag
constructor
A new instance of FDroidRepoInfoTag.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ FDroidRepoInfoTag
Returns a new instance of FDroidRepoInfoTag.
25 26 27 |
# File 'lib/jekyll/FDroidRepoInfoTag.rb', line 25 def initialize(tag_name, text, tokens) super end |
Instance Method Details
#render(context) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/jekyll/FDroidRepoInfoTag.rb', line 29 def render(context) site = context.registers[:site] url = site.config['fdroid-repo'] index = FDroid::IndexV1.download(url, 'en') "#{index.repo.name} #{index.repo.date}" end |