Class: WebFacter::App

Inherits:
Object
  • Object
show all
Defined in:
lib/web-facter.rb

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
# File 'lib/web-facter.rb', line 8

def call env
  response = Rack::Response.new
  response.header['Content-Type'] = 'application/json'
  response.write JSON.pretty_generate(Facter.to_hash)
  response.finish
end