Class: ClaudeAgentSDK::TaskUsage
- Defined in:
- lib/claude_agent_sdk/types.rb
Overview
Typed usage data for task progress and notifications
Instance Attribute Summary collapse
-
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
-
#tool_uses ⇒ Object
Returns the value of attribute tool_uses.
-
#total_tokens ⇒ Object
Returns the value of attribute total_tokens.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TaskUsage
constructor
A new instance of TaskUsage.
Methods inherited from Type
#[], #[]=, from_hash, #to_h, wrap
Constructor Details
#initialize(attributes = {}) ⇒ TaskUsage
Returns a new instance of TaskUsage.
313 314 315 316 317 318 |
# File 'lib/claude_agent_sdk/types.rb', line 313 def initialize(attributes = {}) super @total_tokens ||= 0 @tool_uses ||= 0 @duration_ms ||= 0 end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ClaudeAgentSDK::Type
Instance Attribute Details
#duration_ms ⇒ Object
Returns the value of attribute duration_ms.
311 312 313 |
# File 'lib/claude_agent_sdk/types.rb', line 311 def duration_ms @duration_ms end |
#tool_uses ⇒ Object
Returns the value of attribute tool_uses.
311 312 313 |
# File 'lib/claude_agent_sdk/types.rb', line 311 def tool_uses @tool_uses end |
#total_tokens ⇒ Object
Returns the value of attribute total_tokens.
311 312 313 |
# File 'lib/claude_agent_sdk/types.rb', line 311 def total_tokens @total_tokens end |