Ravn::BDE::
Segment class
Superclass | Object |
This is the base class for segments, which provides a way of grouping users together with late binding for messaging. It is fundamentally a function over all callsigns in a mission that yields a Set. These can be combined using set algebra to describe a dynamic grouping of message recipients, allowed message senders, etc.
"within 10 meters": type: proximity config: distance: 10 "within 100 meters": type: proximity config: distance: 100 "squad leaders": type: group config: members: []
There is a special instance of the base class that is the default (or “all”) segment.
Constants
- DEFAULT_SEGMENT_NAME
The name of the default segment
- DELEGATION_EXCEPTIONS
Methods to not delegate to the underlying Set.
Attributes
Public Class Methods
Returns a default (everyone) segment.
Set up a new segment with the given (human-readable) name
and initial set of member_candidates
(anything Enumerable).
Ensure the given config
makes sense for the segment type in the given mission
, raising a Ravn::BDE::ValidationError
if not.
Public Instance Methods
Equality API – returns true
if the other_object
is equivalent
Return a subset of the members returned by the member_candidates
callable.
Pluggability API: path to search for child classes
Loggability API: log to the Ravn::BDE
logger
Return the current segment members as a Hash keyed by callsign.