-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathresult.rbs
More file actions
85 lines (64 loc) · 2.68 KB
/
result.rbs
File metadata and controls
85 lines (64 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
class Solid::Result
private attr_accessor unknown: bool
private attr_writer event_logs: Hash[Symbol, untyped]
private attr_reader type_checker: Solid::Result::Contract::TypeChecker
attr_reader data: Solid::Result::Data
attr_reader source: untyped
attr_reader terminal: bool
attr_reader event_logs: Hash[Symbol, untyped]
def self.config: -> Solid::Result::Config
def self.configuration: (freeze: bool) { (Solid::Result::Config) -> void } -> (bool | Solid::Result::Config)
def self.event_logs: (name: untyped, desc: untyped) { () -> untyped } -> Solid::Result
def initialize: (
type: Symbol,
value: untyped,
?source: untyped,
?expectations: Solid::Result::Contract::Evaluator,
?terminal: bool
) -> void
def type: -> Symbol
def value: -> untyped
def type?: (Symbol | String) -> bool
def terminal?: -> bool
def success?: (?Symbol type) -> bool
def failure?: (?Symbol type) -> bool
def value_or: { () -> untyped } -> untyped
def on: (*Symbol) { (untyped, Symbol) -> void } -> Solid::Result
def on_success: (*Symbol) { (untyped, Symbol) -> void } -> Solid::Result
def on_failure: (*Symbol) { (untyped, Symbol) -> void } -> Solid::Result
def on_unknown: () { (untyped, Symbol) -> void } -> Solid::Result
def and_then: (?Symbol method_name, ?untyped injected_value) ?{ (untyped) -> untyped } -> untyped
def and_then!: (untyped, ?untyped injected_value, _call: (Symbol | nil)) -> untyped
def handle: () { (Solid::Result::Handler) -> void } -> untyped
def ==: (untyped) -> bool
def hash: -> Integer
def inspect: -> String
def deconstruct: -> [Symbol, [Symbol, untyped]]
def deconstruct_keys: (Array[Symbol]) -> Hash[Symbol, Hash[Symbol, untyped]]
TYPE_AND_VALUE: Array[Symbol]
def method_missing: (Symbol, *untyped) { (untyped) -> untyped } -> untyped
alias is? type?
alias eql? ==
alias on_type on
private
def kind: -> Symbol
def known: (Proc) -> untyped
def call_and_then_source_method: (Symbol, untyped) -> Solid::Result
def call_and_then_source_method!: (untyped, untyped) -> Solid::Result
def call_and_then_block: (untyped) -> Solid::Result
def call_and_then_block!: (untyped) -> Solid::Result
def call_and_then_callable!: (untyped, value: untyped, injected_value: untyped, method_name: (Symbol | nil)) -> Solid::Result
def ensure_result_object: (untyped, origin: Symbol) -> Solid::Result
end
class Solid::Result
class Success < Solid::Result
include Solid::Success
end
def self.Success: (Symbol type, ?untyped value) -> Solid::Result::Success
end
class Solid::Result
class Failure < Solid::Result
include Solid::Failure
end
def self.Failure: (Symbol type, ?untyped value) -> Solid::Result::Failure
end