Class: Archimate::DataModel::Property
- Inherits:
-
Object
- Object
- Archimate::DataModel::Property
- Includes:
- Comparison
- Defined in:
- lib/archimate/data_model/property.rb
Overview
A Property instance type declaring the reference to a [PropertyDefinition] and containing the property value.
Instance Attribute Summary collapse
-
#property_definition ⇒ PropertyDefinition
Property definition of the property.
-
#value ⇒ LangString, NilClass
readonly
Value of the property, default
nil
.
Instance Method Summary collapse
Methods included from Comparison
#==, #[], #dig, #each, #hash, included, #initialize, #inspect, #pretty_print, #to_h
Instance Attribute Details
#property_definition ⇒ PropertyDefinition
Returns property definition of the property.
15 |
# File 'lib/archimate/data_model/property.rb', line 15 model_attr :property_definition, writable: true |
#value ⇒ LangString, NilClass (readonly)
Returns value of the property, default nil
.
12 |
# File 'lib/archimate/data_model/property.rb', line 12 model_attr :value, default: nil |
Instance Method Details
#key ⇒ Object
21 22 23 |
# File 'lib/archimate/data_model/property.rb', line 21 def key property_definition.name end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/archimate/data_model/property.rb', line 17 def to_s "Property(key: #{property_definition.name}, value: #{value || 'no value'})" end |