Module: HttpStub::Server::Stub::Response

Defined in:
lib/http_stub/server/stub/response.rb,
lib/http_stub/server/stub/response/base.rb,
lib/http_stub/server/stub/response/file.rb,
lib/http_stub/server/stub/response/text.rb

Defined Under Namespace

Classes: Base, File, Text

Class Method Summary collapse

Class Method Details

.create(args) ⇒ Object



7
8
9
10
# File 'lib/http_stub/server/stub/response.rb', line 7

def self.create(args)
  args["body"].is_a?(Hash) ?
    HttpStub::Server::Stub::Response::File.new(args) : HttpStub::Server::Stub::Response::Text.new(args)
end