abstract class
Athena::Serializer::Context
- Athena::Serializer::Context
- Reference
- Object
Overview
Stores runtime data about the current action.
Such as what serialization groups/version to use when serializing.
!!!warning Cannot be used for more than one action.
Direct Known Subclasses
Defined in:
context.crInstance Method Summary
-
#add_exclusion_strategy(strategy : ASR::ExclusionStrategies::ExclusionStrategyInterface) : self
Adds strategy to
self. -
#direction : ASR::Context::Direction
Returns which (de)serialization action
selfrepresents. -
#exclusion_strategy : ASR::ExclusionStrategies::ExclusionStrategyInterface | Nil
The
ASR::ExclusionStrategies::ExclusionStrategyInterfacebeing used. -
#groups : Set(String) | Nil
Returns the serialization groups, if any, currently set on
self. -
#groups=(groups : Enumerable(String)) : self
Sets the group(s) to compare against properties'
ASRA::Groupsannotations. -
#version : SemanticVersion | Nil
Returns the version, if any, currently set on
self. -
#version=(version : SemanticVersion | Nil)
Returns the version, if any, currently set on
self. -
#version=(version : String) : self
Sets the version to compare against properties'
ASRA::SinceandASRA::Untilannotations.
Instance Method Detail
Adds strategy to self.
#exclusion_strategyis set to strategy if there previously was no strategy.#exclusion_strategyis set toASR::ExclusionStrategies::Disjunctif there was a#exclusion_strategyalready set.- strategy is added to the
ASR::ExclusionStrategies::Disjunctif there are multiple strategies.
Returns which (de)serialization action self represents.
The ASR::ExclusionStrategies::ExclusionStrategyInterface being used.
Sets the group(s) to compare against properties' ASRA::Groups annotations.
Adds a ASR::ExclusionStrategies::Groups automatically if set.
Sets the version to compare against properties' ASRA::Since and ASRA::Until annotations.
Adds an ASR::ExclusionStrategies::Version automatically if set.