Class: Keiyaku::ByStatus
- Inherits:
-
Object
- Object
- Keiyaku::ByStatus
- Defined in:
- sig/keiyaku.rbs,
lib/keiyaku/runtime.rb
Overview
Several success responses that are several types:
into: ByStatus[200 => PagesHealthCheck, 202 => EmptyObject]
Not a type — nothing casts into one of these — but the thing an
operation's into: is when the document gave more than one answer. The
document says which type belongs to which status and the response carries
the status, so the choice is read rather than guessed. A status the
document did not describe is left alone, since the alternative is a
CastError naming a type the server never claimed to be sending.
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
- #[](status) ⇒ Object
-
#initialize(types) ⇒ ByStatus
constructor
A new instance of ByStatus.
Constructor Details
#initialize(types) ⇒ ByStatus
Returns a new instance of ByStatus.
115 |
# File 'sig/keiyaku.rbs', line 115
def initialize: (Hash[Integer | String, untyped]) -> void
|
Instance Attribute Details
#types ⇒ Hash[Integer | String, untyped] (readonly)
117 |
# File 'sig/keiyaku.rbs', line 117
def types: () -> Hash[Integer | String, untyped]
|
Class Method Details
.[](types) ⇒ ByStatus
114 |
# File 'sig/keiyaku.rbs', line 114
def self.[]: (Hash[Integer | String, untyped] types) -> ByStatus
|
Instance Method Details
#[](status) ⇒ Object
116 |
# File 'sig/keiyaku.rbs', line 116
def []: (Integer status) -> untyped
|