Method: Impression::Resource#text_response

Defined in:
lib/impression/resource.rb

#text_response(text, **headers) ⇒ Object

Returns a callable that responds with plain text using the given parameters.

Parameters:

  • text (String)

    response body

  • **headers (Hash)

    additional response headers



160
161
162
# File 'lib/impression/resource.rb', line 160

def text_response(text, **headers)
  ->(req) { req.respond_text(text, **headers) }
end