Class: HttpStub::Server::Stub::Response::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/http_stub/server/stub/response/body.rb

Class Method Summary collapse

Class Method Details

.create(args) ⇒ Object


8
9
10
11
12
13
14
# File 'lib/http_stub/server/stub/response/body.rb', line 8

def self.create(args)
  if args[:body].is_a?(Hash)
    HttpStub::Server::Stub::Response::FileBody.new(args[:body])
  else
    HttpStub::Server::Stub::Response::TextBody.new(args)
  end
end