Class: Archimate::DataModel::Property

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Comparison

#==, #[], #dig, #each, #hash, included, #initialize, #inspect, #pretty_print, #to_h

Instance Attribute Details

#property_definitionPropertyDefinition

Returns property definition of the property.

Returns:



15
# File 'lib/archimate/data_model/property.rb', line 15

model_attr :property_definition, writable: true

#valueLangString, NilClass (readonly)

Returns value of the property, default nil.

Returns:

  • (LangString, NilClass)

    value of the property, default nil



12
# File 'lib/archimate/data_model/property.rb', line 12

model_attr :value, default: nil

Instance Method Details

#keyObject



21
22
23
# File 'lib/archimate/data_model/property.rb', line 21

def key
  property_definition.name
end

#to_sObject



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