Class: LowVoltage::PostFinder
- Inherits:
-
Object
- Object
- LowVoltage::PostFinder
- Defined in:
- lib/low_voltage/post_finder.rb
Constant Summary collapse
- VALID_CHARACTERS =
"a-zA-Z0-9~!@$%^&*()#`_+-=<>\"{}|[];',?".freeze
Instance Method Summary collapse
- #content_path ⇒ Object
- #find ⇒ Object
-
#initialize(post_id) ⇒ PostFinder
constructor
A new instance of PostFinder.
Constructor Details
#initialize(post_id) ⇒ PostFinder
Returns a new instance of PostFinder.
5 6 7 |
# File 'lib/low_voltage/post_finder.rb', line 5 def initialize(post_id) @post_id = post_id end |
Instance Method Details
#content_path ⇒ Object
13 14 15 |
# File 'lib/low_voltage/post_finder.rb', line 13 def content_path LowVoltage.configuration.content_path end |
#find ⇒ Object
9 10 11 |
# File 'lib/low_voltage/post_finder.rb', line 9 def find Rails.root.join("app/views/#{content_path}/#{clean_path}.md") end |