Class: Softcover::App
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Softcover::App
- Defined in:
- lib/softcover/server/app.rb
Instance Method Summary collapse
- #get_chapter ⇒ Object
-
#image_filename(path, extension) ⇒ Object
Returns the image filename for the local document.
Instance Method Details
#get_chapter ⇒ Object
73 74 75 76 77 78 |
# File 'lib/softcover/server/app.rb', line 73 def get_chapter if params[:chapter_slug] @chapter = @manifest.find_chapter_by_slug(params[:chapter_slug]) raise Sinatra::NotFound unless @chapter end end |
#image_filename(path, extension) ⇒ Object
Returns the image filename for the local document.
39 40 41 |
# File 'lib/softcover/server/app.rb', line 39 def image_filename(path, extension) "html/images/#{path}.#{extension}" end |