Class: Time
- Inherits:
-
Object
- Object
- Time
- Defined in:
- lib/rubycord/extend.rb
Overview
rubocop: disable Style/Documentation
Instance Method Summary collapse
-
#to_df(type = nil) ⇒ String
Format a time object to a Discord formatted string.
Instance Method Details
#to_df(type = nil) ⇒ String
Format a time object to a Discord formatted string.
14 15 16 |
# File 'lib/rubycord/extend.rb', line 14 def to_df(type = nil) type.nil? ? "<t:#{to_i}>" : "<t:#{to_i}:#{type}>" end |