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.
849 850 851 852 853 |
# File 'lib/mockserver/models.rb', line 849 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.
847 848 849 |
# File 'lib/mockserver/models.rb', line 847 def callback_class @callback_class end |
#delay ⇒ Object
Returns the value of attribute delay.
847 848 849 |
# File 'lib/mockserver/models.rb', line 847 def delay @delay end |
#primary ⇒ Object
Returns the value of attribute primary.
847 848 849 |
# File 'lib/mockserver/models.rb', line 847 def primary @primary end |
Class Method Details
.callback(callback_class: nil) ⇒ Object
873 874 875 |
# File 'lib/mockserver/models.rb', line 873 def self.callback(callback_class: nil) new(callback_class: callback_class) end |
Instance Method Details
#to_h ⇒ Object
855 856 857 858 859 860 861 |
# File 'lib/mockserver/models.rb', line 855 def to_h MockServer.strip_none({ 'callbackClass' => @callback_class, 'delay' => @delay&.to_h, 'primary' => @primary }) end |