Class: Lutaml::Model::Schema::Definitions::Attribute

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/model/schema/definitions/attribute.rb

Overview

One attribute on a generated class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type:, xml_name:, kind:, collection: false, default: nil, documentation: nil, initialize_empty: false, render_default: false, render_empty: false) ⇒ Attribute

Returns a new instance of Attribute.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 13

def initialize(name:, type:, xml_name:, kind:,
               collection: false, default: nil,
               documentation: nil, initialize_empty: false,
               render_default: false, render_empty: false)
  @name = name
  @type = type
  @xml_name = xml_name
  @kind = kind
  @collection = collection
  @default = default
  @documentation = documentation
  @initialize_empty = initialize_empty
  @render_default = render_default
  @render_empty = render_empty
end

Instance Attribute Details

#collectionObject

Returns the value of attribute collection.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def collection
  @collection
end

#defaultObject

Returns the value of attribute default.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def default
  @default
end

#documentationObject

Returns the value of attribute documentation.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def documentation
  @documentation
end

#initialize_emptyObject

Returns the value of attribute initialize_empty.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def initialize_empty
  @initialize_empty
end

#kindObject

Returns the value of attribute kind.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def kind
  @kind
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def name
  @name
end

#render_defaultObject

Returns the value of attribute render_default.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def render_default
  @render_default
end

#render_emptyObject

Returns the value of attribute render_empty.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def render_empty
  @render_empty
end

#typeObject

Returns the value of attribute type.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def type
  @type
end

#xml_nameObject

Returns the value of attribute xml_name.



9
10
11
# File 'lib/lutaml/model/schema/definitions/attribute.rb', line 9

def xml_name
  @xml_name
end