Class: VK::AGO::Clock
- Inherits:
-
Object
- Object
- VK::AGO::Clock
- Defined in:
- lib/valkey/objects.rb
Instance Method Summary collapse
-
#initialize(t) ⇒ Clock
constructor
A new instance of Clock.
- #to_i ⇒ Object
- #to_s(*s) ⇒ Object
Constructor Details
Instance Method Details
#to_i ⇒ Object
40 41 42 |
# File 'lib/valkey/objects.rb', line 40 def to_i @s end |
#to_s(*s) ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/valkey/objects.rb', line 43 def to_s *s if s[0] @d.format(s[0]) else @d.format('%w %~w %d %~d %H:%M:%S') end end |