Class: PdfSearch::SearchView
- Inherits:
-
Object
- Object
- PdfSearch::SearchView
- Defined in:
- lib/search_view.rb
Instance Method Summary collapse
-
#initialize(search_index) ⇒ SearchView
constructor
A new instance of SearchView.
- #render ⇒ Object
- #search_view_erb_template ⇒ Object
Constructor Details
#initialize(search_index) ⇒ SearchView
Returns a new instance of SearchView.
6 7 8 |
# File 'lib/search_view.rb', line 6 def initialize(search_index) @search_index = search_index end |
Instance Method Details
#render ⇒ Object
14 15 16 17 |
# File 'lib/search_view.rb', line 14 def render template = ERB.new(search_view_erb_template) template.result(binding) end |
#search_view_erb_template ⇒ Object
10 11 12 |
# File 'lib/search_view.rb', line 10 def search_view_erb_template File.read(::PdfSearch.relative_to_gem_path(['html', 'index.html.erb'])) end |