64 lines
776 B
Plaintext
64 lines
776 B
Plaintext
|
module State
|
||
|
def enable: () -> untyped
|
||
|
|
||
|
def disable: () -> (untyped | nil)
|
||
|
|
||
|
def enabled?: () -> bool
|
||
|
|
||
|
def toggle: () -> untyped
|
||
|
end
|
||
|
|
||
|
module UpDown
|
||
|
def up: () -> untyped
|
||
|
|
||
|
def down: () -> untyped
|
||
|
|
||
|
def to_s: () -> ("up" | "down")
|
||
|
|
||
|
def to_json: (*untyped _args) -> (nil | untyped)
|
||
|
end
|
||
|
|
||
|
class Health
|
||
|
@file: untyped
|
||
|
|
||
|
include Singleton
|
||
|
|
||
|
include State
|
||
|
|
||
|
include UpDown
|
||
|
|
||
|
def initialize: () -> void
|
||
|
|
||
|
def healthy?: () -> bool
|
||
|
end
|
||
|
|
||
|
class Ready
|
||
|
@file: untyped
|
||
|
|
||
|
include Singleton
|
||
|
|
||
|
include State
|
||
|
|
||
|
include UpDown
|
||
|
|
||
|
def initialize: () -> void
|
||
|
|
||
|
def ready?: () -> bool
|
||
|
end
|
||
|
|
||
|
class Sleep
|
||
|
@file: untyped
|
||
|
|
||
|
include Singleton
|
||
|
|
||
|
include State
|
||
|
|
||
|
def initialize: () -> void
|
||
|
|
||
|
def asleep?: () -> bool
|
||
|
|
||
|
def wake: () -> untyped
|
||
|
|
||
|
def sleep: () -> untyped
|
||
|
end
|