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.
1678 1679 1680 1681 1682 |
# File 'lib/mockserver/models.rb', line 1678 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.
1676 1677 1678 |
# File 'lib/mockserver/models.rb', line 1676 def binary_data @binary_data end |
#delay ⇒ Object
Returns the value of attribute delay.
1676 1677 1678 |
# File 'lib/mockserver/models.rb', line 1676 def delay @delay end |
#primary ⇒ Object
Returns the value of attribute primary.
1676 1677 1678 |
# File 'lib/mockserver/models.rb', line 1676 def primary @primary end |
Class Method Details
Instance Method Details
#to_h ⇒ Object
1684 1685 1686 1687 1688 1689 1690 |
# File 'lib/mockserver/models.rb', line 1684 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 |