Class: Mintaka::PageFinder
- Inherits:
-
Object
- Object
- Mintaka::PageFinder
- Defined in:
- lib/mintaka/page_finder.rb
Overview
A command for finding pages by id. This encapsulates the concepts of mapping page names to file names.
Constant Summary collapse
- VALID_CHARACTERS =
"a-zA-Z0-9~!@$%^&*()#`_+-=<>\"{}|[];',?".freeze
Instance Method Summary collapse
- #content_path ⇒ Object
-
#find ⇒ Object
Produce a template path to the page, in a format understood by ‘render :template => find`.
-
#initialize(page_id) ⇒ PageFinder
constructor
A new instance of PageFinder.
Constructor Details
#initialize(page_id) ⇒ PageFinder
Returns a new instance of PageFinder.
7 8 9 |
# File 'lib/mintaka/page_finder.rb', line 7 def initialize(page_id) @page_id = page_id end |
Instance Method Details
#content_path ⇒ Object
17 18 19 |
# File 'lib/mintaka/page_finder.rb', line 17 def content_path Mintaka.content_path end |
#find ⇒ Object
Produce a template path to the page, in a format understood by ‘render :template => find`
13 14 15 |
# File 'lib/mintaka/page_finder.rb', line 13 def find "#{content_path}#{clean_path}" end |