Class: Archimate::DataModel::PropertyDefinition
- Inherits:
-
Object
- Object
- Archimate::DataModel::PropertyDefinition
- Includes:
- Comparison
- Defined in:
- lib/archimate/data_model/property_definition.rb
Overview
A Property definition type containing its unique identifier, name, and data type.
Instance Attribute Summary collapse
- #documentation ⇒ PreservedLangString, NilClass readonly
- #id ⇒ String readonly
- #name ⇒ LangString readonly
- #type ⇒ String, NilClass readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, name:, documentation: nil, type: nil) ⇒ PropertyDefinition
constructor
A new instance of PropertyDefinition.
Methods included from Comparison
#==, #[], #dig, #each, #hash, included, #pretty_print, #to_h
Constructor Details
#initialize(id:, name:, documentation: nil, type: nil) ⇒ PropertyDefinition
Returns a new instance of PropertyDefinition.
38 39 40 41 42 43 |
# File 'lib/archimate/data_model/property_definition.rb', line 38 def initialize(id:, name:, documentation: nil, type: nil) @id = id @name = name @documentation = documentation @type = type end |
Instance Attribute Details
#documentation ⇒ PreservedLangString, NilClass (readonly)
21 |
# File 'lib/archimate/data_model/property_definition.rb', line 21 model_attr :documentation |
#id ⇒ String (readonly)
15 |
# File 'lib/archimate/data_model/property_definition.rb', line 15 model_attr :id |
#name ⇒ LangString (readonly)
18 |
# File 'lib/archimate/data_model/property_definition.rb', line 18 model_attr :name |
#type ⇒ String, NilClass (readonly)
Note:
if type is nil, then type “string” is assumed
32 |
# File 'lib/archimate/data_model/property_definition.rb', line 32 model_attr :type |
Class Method Details
.identifier_for_key(key) ⇒ Object
34 35 36 |
# File 'lib/archimate/data_model/property_definition.rb', line 34 def self.identifier_for_key(key) (self.class.hash ^ key.hash).to_s(16) end |