Class: Nox::Styles

Inherits:
WEBrick::HTTPServlet::AbstractServlet
  • Object
show all
Defined in:
lib/nox/ghserver.rb

Instance Method Summary collapse

Instance Method Details

#do_GET(req, rsp) ⇒ Object



49
50
51
52
53
54
55
56
57
# File 'lib/nox/ghserver.rb', line 49

def do_GET req, rsp
  begin
    rsp.status = 200
    rsp['Content-Type'] = 'text/css'
    rsp.body = ['normalize', 'github', 'override'].map do |style|
      File.read(File.absolute_path("../../#{style}.css", File.dirname(__FILE__)))
    end.join("\n")
  end
end