class Ruhoh::UI::Dashboard
Public Class Methods
new(ruhoh)
click to toggle source
# File lib/ruhoh/ui/dashboard.rb, line 2 def initialize(ruhoh) @ruhoh = ruhoh end
Public Instance Methods
call(env)
click to toggle source
# File lib/ruhoh/ui/dashboard.rb, line 6 def call(env) path = @ruhoh.cascade.find_file('dashboard')['realpath'] template = File.open(path, 'r:UTF-8').read view = @ruhoh.master_view({"content" => template }) [200, {'Content-Type' => 'text/html'}, [ view.content ]] end