class Lutaml::Uml::DataType
Attributes
associations[R]
attributes[R]
constraints[R]
data_types[R]
is_abstract[RW]
members[R]
modifier[R]
nested_classifier[RW]
operations[R]
type[RW]
Public Class Methods
new(attributes = {})
click to toggle source
Calls superclass method
# File lib/lutaml/uml/data_type.rb, line 21 def initialize(attributes = {}) @nested_classifier = [] @stereotype = [] @generalization = [] @is_abstract = false super @keyword = "dataType" end
Public Instance Methods
associations=(value)
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 40 def associations=(value) @associations = value.to_a.map do |attr| Association.new(attr.to_h.merge(owner_end: name)) end end
attributes=(value)
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 34 def attributes=(value) @attributes = value.to_a.map do |attr| TopElementAttribute.new(attr) end end
constraints=(value)
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 46 def constraints=(value) @constraints = value.to_a.map do |attr| Constraint.new(attr) end end
data_types=(value)
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 58 def data_types=(value) @data_types = value.to_a.map do |attr| DataType.new(attr) end end
methods()
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 64 def methods # @members&.select { |member| member.class == Method } [] end
modifier=(value)
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 30 def modifier=(value) @modifier = value.to_s # TODO: Validate? end
operations=(value)
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 52 def operations=(value) @operations = value.to_a.map do |attr| Operation.new(attr) end end
relationships()
click to toggle source
# File lib/lutaml/uml/data_type.rb, line 69 def relationships # @members&.select { |member| member.class == ClassRelationship } [] end