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.
935 936 937 938 939 |
# File 'lib/mockserver/models.rb', line 935 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.
933 934 935 |
# File 'lib/mockserver/models.rb', line 933 def callback_class @callback_class end |
#delay ⇒ Object
Returns the value of attribute delay.
933 934 935 |
# File 'lib/mockserver/models.rb', line 933 def delay @delay end |
#primary ⇒ Object
Returns the value of attribute primary.
933 934 935 |
# File 'lib/mockserver/models.rb', line 933 def primary @primary end |
Class Method Details
.callback(callback_class: nil) ⇒ Object
959 960 961 |
# File 'lib/mockserver/models.rb', line 959 def self.callback(callback_class: nil) new(callback_class: callback_class) end |
Instance Method Details
#to_h ⇒ Object
941 942 943 944 945 946 947 |
# File 'lib/mockserver/models.rb', line 941 def to_h MockServer.strip_none({ 'callbackClass' => @callback_class, 'delay' => @delay&.to_h, 'primary' => @primary }) end |