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.
1317 1318 1319 1320 1321 |
# File 'lib/mockserver/models.rb', line 1317 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.
1315 1316 1317 |
# File 'lib/mockserver/models.rb', line 1315 def binary_data @binary_data end |
#delay ⇒ Object
Returns the value of attribute delay.
1315 1316 1317 |
# File 'lib/mockserver/models.rb', line 1315 def delay @delay end |
#primary ⇒ Object
Returns the value of attribute primary.
1315 1316 1317 |
# File 'lib/mockserver/models.rb', line 1315 def primary @primary end |
Class Method Details
Instance Method Details
#to_h ⇒ Object
1323 1324 1325 1326 1327 1328 1329 |
# File 'lib/mockserver/models.rb', line 1323 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 |