Class: Sinatra::APIDocs::Viewer

Inherits:
Base
  • Object
show all
Defined in:
lib/sinatra/api_docs/viewer.rb

Instance Method Summary collapse

Constructor Details

#initialize(api_klass) ⇒ Viewer

Returns a new instance of Viewer.



10
11
12
13
14
15
16
# File 'lib/sinatra/api_docs/viewer.rb', line 10

def initialize(api_klass)
  self.class.set :api_klass, api_klass
  self.class.set :version,   api_klass.name.to_s.split("::").last.downcase
  self.class.set :public,    File.expand_path("../public", __FILE__)
  self.class.set :views,     File.expand_path("../views", __FILE__)
  super()
end