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.
829 830 831 832 833 |
# File 'lib/mockserver/models.rb', line 829 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.
827 828 829 |
# File 'lib/mockserver/models.rb', line 827 def callback_class @callback_class end |
#delay ⇒ Object
Returns the value of attribute delay.
827 828 829 |
# File 'lib/mockserver/models.rb', line 827 def delay @delay end |
#primary ⇒ Object
Returns the value of attribute primary.
827 828 829 |
# File 'lib/mockserver/models.rb', line 827 def primary @primary end |
Class Method Details
.callback(callback_class: nil) ⇒ Object
853 854 855 |
# File 'lib/mockserver/models.rb', line 853 def self.callback(callback_class: nil) new(callback_class: callback_class) end |
Instance Method Details
#to_h ⇒ Object
835 836 837 838 839 840 841 |
# File 'lib/mockserver/models.rb', line 835 def to_h MockServer.strip_none({ 'callbackClass' => @callback_class, 'delay' => @delay&.to_h, 'primary' => @primary }) end |