class Aquamarine::Metadata
- Aquamarine::Metadata
- Reference
- Object
Overview
Metadata is a data structure for storing domain event related metadata.
Defined in:
aquamarine/metadata.crConstructors
-
.new(data : Aquamarine::Metadata | Hash(Symbol, Int32 | String) = self)
Instantiates a new metadata object.
Instance Method Summary
-
#[](key : Symbol)
Data structure query method.
-
#[]=(key, value)
Sets a value under a given key.
-
#allowed_types
Allowed data types for the data structure values.
-
#each(&block)
Enumerates the given block over the data structure elements.
- #to_yaml(builder : YAML::Nodes::Builder)
Constructor Detail
Instantiates a new metadata object.
Instance Method Detail
def [](key : Symbol)
#
Data structure query method. Works just like a hash.
@param key [Symbol] Key @return [] Value stored to given key
def []=(key, value)
#
Sets a value under a given key.
@param key [Symbol] Key @param value [] Value to be stored to given key
def each(&block)
#
Enumerates the given block over the data structure elements.
@param &block [Proc] Block to execute