Module: Retter::Page

Extended by:
Configurable
Defined in:
lib/retter/page.rb,
lib/retter/page/base.rb,
lib/retter/page/feed.rb,
lib/retter/page/entry.rb,
lib/retter/page/index.rb,
lib/retter/page/article.rb,
lib/retter/page/entries.rb,
lib/retter/page/profile.rb

Defined Under Namespace

Modules: Base, ViewHelper Classes: Article, Entries, Entry, Feed, Index, Profile

Class Method Summary collapse

Methods included from Configurable

configurable, define_configurable_method, define_instance_shortcut_method

Class Method Details

.entry_dir(date) ⇒ Object



38
39
40
# File 'lib/retter/page.rb', line 38

def entry_dir(date)
  entries_dir.join date.strftime('%Y%m%d')
end

.entry_file(date) ⇒ Object



34
35
36
# File 'lib/retter/page.rb', line 34

def entry_file(date)
  entries_dir.join date.strftime('%Y%m%d.html')
end

.find_template_path(name) ⇒ Object



24
25
26
27
28
# File 'lib/retter/page.rb', line 24

def find_template_path(name)
  detected = Dir.glob(layouts_dir.join("#{name}.*.*")).first

  Pathname.new(detected)
end

.layout_pathObject



30
31
32
# File 'lib/retter/page.rb', line 30

def layout_path
  @layout_path ||= find_template_path('retter')
end