Class: Lutaml::Uml::Document

Inherits:
Object
  • Object
show all
Includes:
HasAttributes, HasMembers
Defined in:
lib/lutaml/uml/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasMembers

#members=

Methods included from HasAttributes

#update_attributes

Constructor Details

#initialize(attributes = {}) ⇒ Document

rubocop:disable Rails/ActiveRecordAliases



26
27
28
# File 'lib/lutaml/uml/document.rb', line 26

def initialize(attributes = {})
  update_attributes(attributes)
end

Instance Attribute Details

#captionObject

Returns the value of attribute caption.



16
17
18
# File 'lib/lutaml/uml/document.rb', line 16

def caption
  @caption
end

#commentsObject

Returns the value of attribute comments.



16
17
18
# File 'lib/lutaml/uml/document.rb', line 16

def comments
  @comments
end

#fidelityObject

Returns the value of attribute fidelity.



16
17
18
# File 'lib/lutaml/uml/document.rb', line 16

def fidelity
  @fidelity
end

#fontnameObject

Returns the value of attribute fontname.



16
17
18
# File 'lib/lutaml/uml/document.rb', line 16

def fontname
  @fontname
end

#groupsObject

Returns the value of attribute groups.



16
17
18
# File 'lib/lutaml/uml/document.rb', line 16

def groups
  @groups
end

#nameObject

Returns the value of attribute name.



16
17
18
# File 'lib/lutaml/uml/document.rb', line 16

def name
  @name
end

#packagesObject

Returns the value of attribute packages.



23
24
25
# File 'lib/lutaml/uml/document.rb', line 23

def packages
  @packages
end

#titleObject

Returns the value of attribute title.



16
17
18
# File 'lib/lutaml/uml/document.rb', line 16

def title
  @title
end

Instance Method Details

#associationsObject



79
80
81
# File 'lib/lutaml/uml/document.rb', line 79

def associations
  @associations || []
end

#associations=(value) ⇒ Object



53
54
55
56
57
# File 'lib/lutaml/uml/document.rb', line 53

def associations=(value)
  @associations = value.to_a.map do |attributes|
    Association.new(attributes)
  end
end

#classesObject



59
60
61
# File 'lib/lutaml/uml/document.rb', line 59

def classes
  @classes || []
end

#classes=(value) ⇒ Object

rubocop:enable Rails/ActiveRecordAliases



31
32
33
# File 'lib/lutaml/uml/document.rb', line 31

def classes=(value)
  @classes = value.to_a.map { |attributes| Class.new(attributes) }
end

#data_typesObject



67
68
69
# File 'lib/lutaml/uml/document.rb', line 67

def data_types
  @data_types || []
end

#data_types=(value) ⇒ Object



35
36
37
# File 'lib/lutaml/uml/document.rb', line 35

def data_types=(value)
  @data_types = value.to_a.map { |attributes| DataType.new(attributes) }
end

#enumsObject



63
64
65
# File 'lib/lutaml/uml/document.rb', line 63

def enums
  @enums || []
end

#enums=(value) ⇒ Object



39
40
41
# File 'lib/lutaml/uml/document.rb', line 39

def enums=(value)
  @enums = value.to_a.map { |attributes| Enum.new(attributes) }
end

#primitivesObject



75
76
77
# File 'lib/lutaml/uml/document.rb', line 75

def primitives
  @primitives || []
end

#primitives=(value) ⇒ Object



47
48
49
50
51
# File 'lib/lutaml/uml/document.rb', line 47

def primitives=(value)
  @primitives = value.to_a.map do |attributes|
    PrimitiveType.new(attributes)
  end
end