Exception: Rubino::Memory::Store::BudgetExceededError
- Defined in:
- lib/rubino/memory/store.rb
Overview
Raised when adding ‘content` to `kind`’s group would push the group’s total characters past the configured budget. Group rules live in Store#group_for_kind — user_profile is its own group, everything else shares the general “memory” budget.
Instance Attribute Summary collapse
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#requested ⇒ Object
readonly
Returns the value of attribute requested.
Instance Method Summary collapse
-
#initialize(group:, limit:, current:, requested:) ⇒ BudgetExceededError
constructor
A new instance of BudgetExceededError.
Constructor Details
#initialize(group:, limit:, current:, requested:) ⇒ BudgetExceededError
Returns a new instance of BudgetExceededError.
40 41 42 43 44 45 46 47 |
# File 'lib/rubino/memory/store.rb', line 40 def initialize(group:, limit:, current:, requested:) @group = group @limit = limit @current = current @requested = requested super("memory budget exceeded for #{group}: " \ "#{current}+#{requested} > #{limit}") end |
Instance Attribute Details
#current ⇒ Object (readonly)
Returns the value of attribute current.
38 39 40 |
# File 'lib/rubino/memory/store.rb', line 38 def current @current end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
38 39 40 |
# File 'lib/rubino/memory/store.rb', line 38 def group @group end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
38 39 40 |
# File 'lib/rubino/memory/store.rb', line 38 def limit @limit end |
#requested ⇒ Object (readonly)
Returns the value of attribute requested.
38 39 40 |
# File 'lib/rubino/memory/store.rb', line 38 def requested @requested end |