Class: Backdrop::Builders::Get

Inherits:
Backdrop::Builder show all
Defined in:
lib/backdrop/builders/get.rb

Instance Method Summary collapse

Methods inherited from Backdrop::Builder

#build_response

Instance Method Details

#build(output, project, data) ⇒ Object



9
10
11
12
# File 'lib/backdrop/builders/get.rb', line 9

def build(output, project, data)
  response = data['requests'].first['response_body']
  build_response(output, project, data, response)
end

#route(app, file) ⇒ Object



4
5
6
7
# File 'lib/backdrop/builders/get.rb', line 4

def route(app, file)
  app.content_type :json
  File.read File.expand_path(file)
end