Class: SwarmSDK::V3::Tools::Clock
- Defined in:
- lib/swarm_sdk/v3/tools/clock.rb
Overview
Clock tool provides current date and time information
Returns current temporal information in a consistent format. Agents use this when they need to know what day/time it is.
Instance Method Summary collapse
-
#execute ⇒ String
Formatted date/time information.
Methods inherited from Base
Instance Method Details
#execute ⇒ String
Returns Formatted date/time information.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/swarm_sdk/v3/tools/clock.rb', line 19 def execute now = Time.now <<~RESULT.chomp Current date: #{now.strftime("%Y-%m-%d")} Current time: #{now.strftime("%H:%M:%S")} Day of week: #{now.strftime("%A")} ISO 8601: #{now.iso8601} RESULT end |