Class: Courier::Models::TopicDigestCategory
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Courier::Models::TopicDigestCategory
- Defined in:
- lib/courier/models/topic_digest_category.rb,
sig/courier/models/topic_digest_category.rbs
Defined Under Namespace
Modules: Retain
Instance Attribute Summary collapse
-
#category_key ⇒ String
The key that identifies the category within the digest.
-
#limit ⇒ Integer?
How many collected events are carried into the rendered digest.
-
#retain ⇒ Symbol, ...
Which collected events survive the
limit. -
#sort_key ⇒ String?
The data key used to rank events.
Instance Method Summary collapse
-
#initialize(category_key:, limit: nil, retain: nil, sort_key: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see TopicDigestCategory for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(category_key:, limit: nil, retain: nil, sort_key: nil) ⇒ Object
Some parameter documentations has been truncated, see Courier::Models::TopicDigestCategory for more details.
How events collected under a category key are retained when a digest holds more than it will render.
|
|
# File 'lib/courier/models/topic_digest_category.rb', line 37
|
Instance Attribute Details
#category_key ⇒ String
The key that identifies the category within the digest.
10 |
# File 'lib/courier/models/topic_digest_category.rb', line 10 required :category_key, String |
#limit ⇒ Integer?
How many collected events are carried into the rendered digest. Defaults to 10.
Events beyond the limit are discarded, not held back for the next digest: the
release consumes everything collected so far and only limit of them appear.
retain decides which ones those are.
20 |
# File 'lib/courier/models/topic_digest_category.rb', line 20 optional :limit, Integer |
#retain ⇒ Symbol, ...
Which collected events survive the limit. FIRST and LOWEST keep the
earliest or smallest; LAST and HIGHEST keep the latest or largest. Accepted
case-insensitively, returned uppercase.
28 |
# File 'lib/courier/models/topic_digest_category.rb', line 28 optional :retain, enum: -> { Courier::TopicDigestCategory::Retain } |
#sort_key ⇒ String?
The data key used to rank events. Required when retain is HIGHEST or
LOWEST.
35 |
# File 'lib/courier/models/topic_digest_category.rb', line 35 optional :sort_key, String |
Instance Method Details
#to_hash ⇒ {
35 |
# File 'sig/courier/models/topic_digest_category.rbs', line 35
def to_hash: -> {
|