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



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

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

#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



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

def associations
  @associations || []
end

#associations=(value) ⇒ Object



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

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

#classesObject



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

def classes
  @classes || []
end

#classes=(value) ⇒ Object

rubocop:enable Rails/ActiveRecordAliases



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

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

#data_typesObject



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

def data_types
  @data_types || []
end

#data_types=(value) ⇒ Object



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

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

#enumsObject



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

def enums
  @enums || []
end

#enums=(value) ⇒ Object



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

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

#packagesObject



70
71
72
# File 'lib/lutaml/uml/document.rb', line 70

def packages
  @packages || []
end

#packages=(value) ⇒ Object



42
43
44
# File 'lib/lutaml/uml/document.rb', line 42

def packages=(value)
  @packages = value.to_a.map { |attributes| Package.new(attributes) }
end

#primitivesObject



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

def primitives
  @primitives || []
end

#primitives=(value) ⇒ Object



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

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