Module: Jekyll::Podcast::Utils
- Defined in:
- lib/jekyll/podcast/utils.rb
Overview
Utility functions used in jekyll-podcast
Class Method Summary collapse
Class Method Details
.duration(seconds) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/jekyll/podcast/utils.rb', line 8 def duration(seconds) mm, ss = seconds.divmod(60) hh, mm = mm.divmod(60) dd, hh = hh.divmod(24) { days: dd, hours: hh, minutes: mm, seconds: ss } end |
.episodes_dir(site) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/jekyll/podcast/utils.rb', line 20 def episodes_dir(site) if site.config['podcast']['remote_episode_host'] File.join(site.source, '_episodes') else File.join(site.source, 'assets/episodes') end end |