Sha256: 81da0648ad3f913ced59ebf85ef21d93514b38fe66563a31abfb48f215b08fae
Contents?: true
Size: 737 Bytes
Versions: 21
Compression:
Stored size: 737 Bytes
Contents
# frozen_string_literal: true class Time # # Format a time object to a Discord formatted string. # # @param ["f", "F", "d", "D", "t", "T", "R"] type The format to use. # # @return [String] The formatted time. # def to_df(type = nil) if type.nil? "<t:#{to_i}>" else "<t:#{to_i}:#{type}>" end end end # @private class Async::Node def description @object_name ||= "#{self.class}:0x#{object_id.to_s(16)}#{@transient ? " transient" : nil}" if @annotation "#{@object_name} #{@annotation}" elsif line = self.backtrace(0, 1)&.first "#{@object_name} #{line}" else @object_name end end def to_s "\#<#{self.description}>" end alias inspect to_s end
Version data entries
21 entries across 21 versions & 1 rubygems