Sha256: e581117b24cf7f2b8b44856f93b5ad006ac83c0d9a964346b7b806b8717f2ec2
Contents?: true
Size: 1.34 KB
Versions: 2
Compression:
Stored size: 1.34 KB
Contents
module Discorb # # Represents Snowflake of Discord. # # @see https://discord.com/developers/docs/reference#snowflakes Official Discord API docs class Snowflake < String # # Initialize new snowflake. # @private # # @param [#to_s] value The value of the snowflake. def initialize: (untyped value) -> void # # Compares snowflake with other object. # # @param [#to_s] other Object to compare with. # # @return [Boolean] True if snowflake is equal to other object. def ==: (untyped other) -> bool # # Alias of {#==}. def eql?: (untyped other) -> bool # Return hash of snowflake. %a{pure} def hash: -> untyped %a{pure} def inspect: -> String # Timestamp of snowflake. # # @return [Time] Timestamp of snowflake. attr_reader timestamp: Time # Worker ID of snowflake. # # @return [Integer] Worker ID of snowflake. attr_reader worker_id: Integer # Process ID of snowflake. # # @return [Integer] Process ID of snowflake. attr_reader process_id: Integer # Increment of snowflake. # # @return [Integer] Increment of snowflake. attr_reader increment: Integer # Alias of to_s. # # @return [String] The snowflake. attr_reader id: String end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
discorb-0.20.0 | sig/discorb/snowflake.rbs |
discorb-0.19.0 | sig/discorb/snowflake.rbs |