Class: MockServer::HttpClassCallback
- Inherits:
-
Object
- Object
- MockServer::HttpClassCallback
- Defined in:
- lib/mockserver/models.rb
Instance Attribute Summary collapse
-
#callback_class ⇒ Object
Returns the value of attribute callback_class.
-
#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(callback_class: nil, delay: nil, primary: nil) ⇒ HttpClassCallback
constructor
A new instance of HttpClassCallback.
- #to_h ⇒ Object
Constructor Details
#initialize(callback_class: nil, delay: nil, primary: nil) ⇒ HttpClassCallback
Returns a new instance of HttpClassCallback.
877 878 879 880 881 |
# File 'lib/mockserver/models.rb', line 877 def initialize(callback_class: nil, delay: nil, primary: nil) @callback_class = callback_class @delay = delay @primary = primary end |
Instance Attribute Details
#callback_class ⇒ Object
Returns the value of attribute callback_class.
875 876 877 |
# File 'lib/mockserver/models.rb', line 875 def callback_class @callback_class end |
#delay ⇒ Object
Returns the value of attribute delay.
875 876 877 |
# File 'lib/mockserver/models.rb', line 875 def delay @delay end |
#primary ⇒ Object
Returns the value of attribute primary.
875 876 877 |
# File 'lib/mockserver/models.rb', line 875 def primary @primary end |
Class Method Details
.callback(callback_class: nil) ⇒ Object
901 902 903 |
# File 'lib/mockserver/models.rb', line 901 def self.callback(callback_class: nil) new(callback_class: callback_class) end |
Instance Method Details
#to_h ⇒ Object
883 884 885 886 887 888 889 |
# File 'lib/mockserver/models.rb', line 883 def to_h MockServer.strip_none({ 'callbackClass' => @callback_class, 'delay' => @delay&.to_h, 'primary' => @primary }) end |