Class: Clayoven::IndexPage

Inherits:
Page
  • Object
show all
Defined in:
lib/clayoven.rb

Instance Attribute Summary

Attributes inherited from Page

#body, #filename, #indexfill, #paragraphs, #permalink, #target, #timestamp, #title, #topic, #topics

Instance Method Summary collapse

Methods inherited from Page

#render

Constructor Details

#initialize(filename) ⇒ IndexPage

Returns a new instance of IndexPage.



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/clayoven.rb', line 42

def initialize(filename)
  @filename = filename
  if @filename == "index"
    @permalink = @filename
  else
    @permalink = filename.split(".index")[0]
  end
  @topic = @permalink
  @target = "#{@permalink}.html"
  @timestamp = when_introduced @filename
end