Class: Riemann::Dash::App

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/riemann/dash/app.rb,
lib/riemann/dash/controller/css.rb,
lib/riemann/dash/controller/index.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.configObject



11
12
13
# File 'lib/riemann/dash/app.rb', line 11

def self.config
  Riemann::Dash::Config.instance
end

.load(filename) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/riemann/dash/app.rb', line 19

def self.load(filename)
  filename ||= 'config.rb'
  unless config.load_config(filename)
    # Configuration failed; load a default view.
    puts "No configuration loaded; using defaults."
  end

  config.load_controllers
  config.setup_views
  config.setup_public_dir
end

Instance Method Details

#configObject



15
16
17
# File 'lib/riemann/dash/app.rb', line 15

def config
  self.class.config
end