class HttpStub::Server::Stub::Match::Rule::Body
Public Class Methods
create(body)
click to toggle source
# File lib/http_stub/server/stub/match/rule/body.rb, line 9 def self.create(body) if body.is_a?(Hash) HttpStub::Server::Stub::Match::Rule::SchemaBody.create(body.with_indifferent_access[:schema]) elsif body.present? HttpStub::Server::Stub::Match::Rule::SimpleBody.new(body) else HttpStub::Server::Stub::Match::Rule::Truthy end end