struct CrSerializer::PropertyMetadata(IvarType, ClassType)

Overview

Represents metadata associated with a property.

All properties are defined via annotations applied to the property, or pulled directly from the ivar declaration.

Included Modules

Defined in:

property_metadata.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, external_name : String, value : IvarType = nil, skip_when_empty : Bool = false, groups : Array(String) = ["default"], aliases : Array(String) = [] of String, since_version : SemanticVersion? = nil, until_version : SemanticVersion? = nil, type : IvarType.class = IvarType, class __arg0 : ClassType.class = ClassType) #

[View source]

Instance Method Detail

def aliases : Array(String) #

Deserialize this property from the property's name or any name in aliases.

See CRS::Name.


[View source]
def class : ClassType.class #

The class that the property is part of.


[View source]
def external_name : String #

The name that should be used for serialization/deserialization.


[View source]
def groups : Array(String) #

The serialization groups this property belongs to.

See CrSerializer::ExclusionStrategies::Groups.


[View source]
def name : String #

The name of the property.


[View source]
def since_version : SemanticVersion? #

Represents the first version this property is available.

See CrSerializer::ExclusionStrategies::Version.


[View source]
def since_version=(since_version : SemanticVersion?) #

Represents the first version this property is available.

See CrSerializer::ExclusionStrategies::Version.


[View source]
def skip_when_empty? : Bool #

If this property should not be serialized if it is empty.

See CRS::SkipWhenEmpty.


[View source]
def type : IvarType.class #

The type of the property.


[View source]
def until_version : SemanticVersion? #

Represents the last version this property was available.

See CrSerializer::ExclusionStrategies::Version.


[View source]
def until_version=(until_version : SemanticVersion?) #

Represents the last version this property was available.

See CrSerializer::ExclusionStrategies::Version.


[View source]
def value : IvarType #

The value of the property.


[View source]