Sha256: 7f41a2f96dec216ff8422a9a1953bd3adcc904db3b48c3fcbd0f4ddfabd4b8e3

Contents?: true

Size: 831 Bytes

Versions: 46

Compression:

Stored size: 831 Bytes

Contents

# frozen_string_literal: true

require "lutaml/uml/serializers/base"
require "lutaml/uml/serializers/top_element_attribute"
require "lutaml/uml/serializers/association"

module Lutaml
  module Uml
    module Serializers
      class Class < Base
        property :attributes,
                 transform_with: (lambda do |entry|
                   entry
                    .to_a
                    .map do |(name, attributes)|
                      attributes.merge(name: name)
                    end
                 end)
        property :associations,
                 from: :relations,
                 coerce: Array[::Lutaml::Uml::Serializers::Association]
        property :name
        # property :type, from: :modelType
        # property :relations,
        #          coerce: Array[Relation]
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
lutaml-0.9.25 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.24 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.23 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.22 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.21 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.20 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.19 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.18 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.17 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.16 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.15 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.14 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.13 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.12 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.11 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.10 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.9 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.8 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.7 lib/lutaml/uml/serializers/class.rb
lutaml-0.9.6 lib/lutaml/uml/serializers/class.rb