Class: Aardi::Folder

Inherits:
Object
  • Object
show all
Defined in:
lib/aardi/folder.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Folder

Returns a new instance of Folder.



5
6
7
8
# File 'lib/aardi/folder.rb', line 5

def initialize(path)
  @path = path
  @normalized_path = "#{path.sub(/^\./, '')}/"
end

Instance Method Details

#mtimeObject



10
# File 'lib/aardi/folder.rb', line 10

def mtime = children.max_by(&:mtime)&.mtime

#renderObject



12
13
14
15
16
# File 'lib/aardi/folder.rb', line 12

def render
  children.each(&:render)

  update_sitemap if Aardi.config[:sitemap_entries][@normalized_path]
end