Class: Mountebank::Stub::TcpResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/mountebank/stub/tcp_response.rb

Instance Attribute Summary

Attributes inherited from Response

#inject, #is, #proxy

Class Method Summary collapse

Methods inherited from Response

#initialize, #to_json, with_injection

Constructor Details

This class inherits a constructor from Mountebank::Stub::Response

Class Method Details

.create(data = '') ⇒ Object



2
3
4
5
6
7
8
# File 'lib/mountebank/stub/tcp_response.rb', line 2

def self.create(data='')
  payload = {}
  payload[:data] = data unless data.empty?

  data = {is: payload}
  new(data)
end