Class: Lutaml::Model::ValuePolicy
- Inherits:
-
Object
- Object
- Lutaml::Model::ValuePolicy
- Defined in:
- lib/lutaml/model/value_policy.rb
Overview
Decides how an attribute shapes incoming raw values: whether an Array is split element-wise (collection semantics) or handed whole to the declared type (value-owning semantics).
A user-defined Type::Value subclass may legitimately wrap lists or maps in a singular slot (#752); built-in scalar types keep the "collection: true is missing" guidance error.
Instance Method Summary collapse
-
#initialize(collection:, union:, reference:) ⇒ ValuePolicy
constructor
A new instance of ValuePolicy.
-
#whole_value?(type) ⇒ Boolean
Whether raw values must reach the type whole.
Constructor Details
#initialize(collection:, union:, reference:) ⇒ ValuePolicy
13 14 15 16 17 |
# File 'lib/lutaml/model/value_policy.rb', line 13 def initialize(collection:, union:, reference:) @collection = collection @union = union @reference = reference end |