Class: LowVoltage::PostFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/low_voltage/post_finder.rb

Constant Summary collapse

VALID_CHARACTERS =
"a-zA-Z0-9~!@$%^&*()#`_+-=<>\"{}|[];',?".freeze

Instance Method Summary collapse

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_pathObject



13
14
15
# File 'lib/low_voltage/post_finder.rb', line 13

def content_path
  LowVoltage.configuration.content_path
end

#findObject



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