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.
Constant Summary collapse
- @@repotag =
''
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 36 37 |
# File 'lib/jekyll/FDroidRepoInfoTag.rb', line 29 def render(context) if @@repotag == '' site = context.registers[:site] url = site.config['fdroid-repo'] index = FDroid::IndexV1.download(url, 'en') @@repotag = "#{index.repo.name} #{index.repo.date}" end return @@repotag end |