Sha256: bb35b90537cfb18258d5e3bf0cd03ae35a1627fd8cd25d24179e30953abb934f

Contents?: true

Size: 1.07 KB

Versions: 17

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

module Lutaml
  module XMI
    class DataTypeDrop < Liquid::Drop
      def initialize(model) # rubocop:disable Lint/MissingSuper
        @model = model
      end

      def xmi_id
        @model[:xmi_id]
      end

      def name
        @model[:name]
      end

      def attributes
        @model[:attributes]&.map do |attribute|
          ::Lutaml::XMI::AttributeDrop.new(attribute)
        end
      end

      def operations
        @model[:operations]&.map do |operation|
          ::Lutaml::XMI::OperationDrop.new(operation)
        end
      end

      def associations
        @model[:associations]&.map do |association|
          ::Lutaml::XMI::AssociationDrop.new(association)
        end
      end

      def constraints
        @model[:constraints]&.map do |constraint|
          ::Lutaml::XMI::ConstraintDrop.new(constraint)
        end
      end

      def is_abstract
        @model[:is_abstract]
      end

      def definition
        @model[:definition]
      end

      def stereotype
        @model[:stereotype]
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
lutaml-0.9.27 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.26 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.25 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.24 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.23 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.22 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.21 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.20 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.19 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.18 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.17 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.16 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.15 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.14 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.13 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.12 lib/lutaml/xmi/liquid_drops/data_type_drop.rb
lutaml-0.9.11 lib/lutaml/xmi/liquid_drops/data_type_drop.rb