Class: WireMockMapper::ResponseBuilder
- Inherits:
-
Object
- Object
- WireMockMapper::ResponseBuilder
- Defined in:
- lib/response_builder.rb
Instance Method Summary collapse
-
#initialize ⇒ ResponseBuilder
constructor
A new instance of ResponseBuilder.
- #to_hash ⇒ Object
- #to_json ⇒ Object
- #with_body(value) ⇒ Object
Constructor Details
#initialize ⇒ ResponseBuilder
Returns a new instance of ResponseBuilder.
3 4 5 |
# File 'lib/response_builder.rb', line 3 def initialize = {} end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 |
# File 'lib/response_builder.rb', line 13 def to_hash(*) end |
#to_json ⇒ Object
17 18 19 |
# File 'lib/response_builder.rb', line 17 def to_json(*) .to_json end |
#with_body(value) ⇒ Object
7 8 9 10 11 |
# File 'lib/response_builder.rb', line 7 def with_body(value) value = value.to_json unless value.is_a? String ['body'] = value self end |