Class: UltraSettings::RackApp
- Inherits:
-
Object
- Object
- UltraSettings::RackApp
- Defined in:
- lib/ultra_settings/rack_app.rb
Overview
Rack application for displaying the current settings in an HTML page. No setting values are displayed, but you should still add some sort of authentication if you want to use this in production.
Instance Method Summary collapse
-
#call(env) ⇒ Array
Handle Rack requests and return the settings HTML page.
-
#initialize(color_scheme: nil) ⇒ RackApp
constructor
Initialize a new Rack application for displaying settings.
Constructor Details
#initialize(color_scheme: nil) ⇒ RackApp
Initialize a new Rack application for displaying settings.
11 12 13 14 |
# File 'lib/ultra_settings/rack_app.rb', line 11 def initialize(color_scheme: nil) @webview = nil @color_scheme = color_scheme end |
Instance Method Details
#call(env) ⇒ Array
Handle Rack requests and return the settings HTML page.
20 21 22 |
# File 'lib/ultra_settings/rack_app.rb', line 20 def call(env) [200, {"content-type" => "text/html; charset=utf8"}, [webview.render_settings]] end |