Class: RedisDashboard::Application
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- RedisDashboard::Application
- Defined in:
- lib/redis_dashboard/application.rb
Instance Method Summary collapse
Instance Method Details
#client ⇒ Object
43 44 45 |
# File 'lib/redis_dashboard/application.rb', line 43 def client @client ||= RedisDashboard::Client.new(RedisDashboard.urls[redis_id.to_i]) end |
#clients ⇒ Object
47 48 49 50 51 |
# File 'lib/redis_dashboard/application.rb', line 47 def clients @clients ||= RedisDashboard.urls.map do |url| RedisDashboard::Client.new(url) end end |
#close_clients ⇒ Object
53 54 55 56 |
# File 'lib/redis_dashboard/application.rb', line 53 def close_clients @client.close if @client @clients.each { |client| client.close } if @clients end |