class HttpStub::Configurator::Stub::Template
Attributes
template[R]
Public Class Methods
new(parent_template=nil, &block)
click to toggle source
# File lib/http_stub/configurator/stub/template.rb, line 11 def initialize(parent_template=nil, &block) @template = HttpStub::Configurator::Stub.create(parent_template.try(:template), &block) end
Public Instance Methods
build_stub(response_overrides={}, &block)
click to toggle source
# File lib/http_stub/configurator/stub/template.rb, line 15 def build_stub(response_overrides={}, &block) HttpStub::Configurator::Stub.create(@template) do |stub| stub.respond_with(response_overrides) stub.invoke(&block) if block_given? end end