toy/sig/app.rbs

64 lines
776 B
Plaintext
Raw Normal View History

2024-07-02 20:22:32 +00:00
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