Class: Aardi::Page
- Inherits:
-
Object
- Object
- Aardi::Page
- Includes:
- AbstractPageSupport
- Defined in:
- lib/aardi/page.rb
Instance Attribute Summary
Attributes included from AbstractPageSupport
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(path) ⇒ Page
constructor
A new instance of Page.
- #render ⇒ Object
- #target_path ⇒ Object
Methods included from AbstractPageSupport
Constructor Details
#initialize(path) ⇒ Page
Returns a new instance of Page.
7 8 9 10 |
# File 'lib/aardi/page.rb', line 7 def initialize(path) @path = path parse_source path end |
Instance Method Details
#content ⇒ Object
12 13 14 |
# File 'lib/aardi/page.rb', line 12 def content @src_content end |
#render ⇒ Object
16 17 18 19 |
# File 'lib/aardi/page.rb', line 16 def render page_content = PageContent.new(content, title, ) PageTarget.new(page_content, target_path).write end |
#target_path ⇒ Object
21 22 23 |
# File 'lib/aardi/page.rb', line 21 def target_path @path.pathmap('%X.html') end |