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
96 97 98 99 100 101 |
# File 'lib/softcover/server/app.rb', line 96 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.
62 63 64 |
# File 'lib/softcover/server/app.rb', line 62 def image_filename(path, extension) "html/images/#{path}.#{extension}" end |