Sha256: 151e7aba8c249b55201eb564426b6247ca4ff1d7c1ae8464647e515b206824be
Contents?: true
Size: 769 Bytes
Versions: 2
Compression:
Stored size: 769 Bytes
Contents
module Discorb # # Represents a event handler. # This class shouldn't be instantiated directly. # Use {Client#on} instead. class EventHandler def initialize: (untyped block, Symbol? id, untyped metadata) -> void %a{pure} def inspect: -> String # # Calls the block associated with the event. def call: (*untyped, **untyped) ?{ (*untyped) -> untyped } -> untyped # @return [Proc] the block to be called. attr_reader block: ^(*untyped) -> void # @return [Symbol] the event id. attr_reader id: Symbol? # @return [Hash] the event metadata. attr_reader metadata: ::Hash[untyped, untyped] # @return [Boolean] whether the event is once or not. attr_reader once: bool end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discorb-0.20.0 | sig/discorb/event_handler.rbs |
discorb-0.19.0 | sig/discorb/event_handler.rbs |