Class: About::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- About::Server
- Includes:
- TextUtils::HypertextHelper
- Defined in:
- lib/about/server.rb
Constant Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
-
#/ ⇒ Object
todo: add page for threads/thread list ?? why? why not?.
- #env_path ⇒ Object
- #path_prefix ⇒ Object
- #rack_path ⇒ Object
- #rails_path ⇒ Object
- #root_path ⇒ Object
- #ruby_path ⇒ Object
- #sinatra_path ⇒ Object
Class Method Details
.banner ⇒ Object
18 19 20 |
# File 'lib/about/server.rb', line 18 def self. "about #{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] on Sinatra/#{Sinatra::VERSION} (#{ENV['RACK_ENV']})" end |
Instance Method Details
#/ ⇒ Object
todo: add page for threads/thread list ?? why? why not?
81 82 83 |
# File 'lib/about/server.rb', line 81 get '/' do redirect( ruby_path ) end |
#env_path ⇒ Object
56 57 58 |
# File 'lib/about/server.rb', line 56 def env_path "#{path_prefix}/env" end |
#path_prefix ⇒ Object
44 45 46 |
# File 'lib/about/server.rb', line 44 def path_prefix request.script_name # request.env['SCRIPT_NAME'] end |
#rack_path ⇒ Object
52 53 54 |
# File 'lib/about/server.rb', line 52 def rack_path "#{path_prefix}/rack" end |
#rails_path ⇒ Object
64 65 66 |
# File 'lib/about/server.rb', line 64 def rails_path "#{path_prefix}/rails" end |
#root_path ⇒ Object
68 69 70 |
# File 'lib/about/server.rb', line 68 def root_path "#{path_prefix}/" end |
#ruby_path ⇒ Object
48 49 50 |
# File 'lib/about/server.rb', line 48 def ruby_path "#{path_prefix}/ruby" end |
#sinatra_path ⇒ Object
60 61 62 |
# File 'lib/about/server.rb', line 60 def sinatra_path "#{path_prefix}/sinatra" end |