Class: ActiveAgent::Delegation::Budget::Violation
- Inherits:
-
Struct
- Object
- Struct
- ActiveAgent::Delegation::Budget::Violation
- Defined in:
- lib/active_agent/delegation/budget.rb
Overview
A limit that has been reached.
Instance Attribute Summary collapse
-
#allowed ⇒ Object
Returns the value of attribute allowed.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#used ⇒ Object
Returns the value of attribute used.
Instance Method Summary collapse
-
#message ⇒ String
Wording aimed at the calling model, not at a developer.
Instance Attribute Details
#allowed ⇒ Object
Returns the value of attribute allowed
33 34 35 |
# File 'lib/active_agent/delegation/budget.rb', line 33 def allowed @allowed end |
#limit ⇒ Object
Returns the value of attribute limit
33 34 35 |
# File 'lib/active_agent/delegation/budget.rb', line 33 def limit @limit end |
#used ⇒ Object
Returns the value of attribute used
33 34 35 |
# File 'lib/active_agent/delegation/budget.rb', line 33 def used @used end |
Instance Method Details
#message ⇒ String
Returns wording aimed at the calling model, not at a developer.
35 36 37 38 |
# File 'lib/active_agent/delegation/budget.rb', line 35 def "Delegation budget exhausted (#{limit}: #{format_number(used)} of #{format_number(allowed)} used). " \ "Do not retry this tool; answer with the information you already have." end |