Class: MockServer::BinaryResponse
- Inherits:
-
Object
- Object
- MockServer::BinaryResponse
- Defined in:
- lib/mockserver/models.rb
Instance Attribute Summary collapse
-
#binary_data ⇒ Object
Returns the value of attribute binary_data.
-
#delay ⇒ Object
Returns the value of attribute delay.
-
#primary ⇒ Object
Returns the value of attribute primary.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(binary_data: nil, delay: nil, primary: nil) ⇒ BinaryResponse
constructor
A new instance of BinaryResponse.
- #to_h ⇒ Object
Constructor Details
#initialize(binary_data: nil, delay: nil, primary: nil) ⇒ BinaryResponse
Returns a new instance of BinaryResponse.
1409 1410 1411 1412 1413 |
# File 'lib/mockserver/models.rb', line 1409 def initialize(binary_data: nil, delay: nil, primary: nil) @binary_data = binary_data @delay = delay @primary = primary end |
Instance Attribute Details
#binary_data ⇒ Object
Returns the value of attribute binary_data.
1407 1408 1409 |
# File 'lib/mockserver/models.rb', line 1407 def binary_data @binary_data end |
#delay ⇒ Object
Returns the value of attribute delay.
1407 1408 1409 |
# File 'lib/mockserver/models.rb', line 1407 def delay @delay end |
#primary ⇒ Object
Returns the value of attribute primary.
1407 1408 1409 |
# File 'lib/mockserver/models.rb', line 1407 def primary @primary end |
Class Method Details
Instance Method Details
#to_h ⇒ Object
1415 1416 1417 1418 1419 1420 1421 |
# File 'lib/mockserver/models.rb', line 1415 def to_h result = {} result['binaryData'] = @binary_data unless @binary_data.nil? result['delay'] = @delay.to_h if @delay result['primary'] = @primary unless @primary.nil? result end |