Sha256: 2b23dc0a32b0e52228bb3fafed9fcddcd82be5f9e79d8d644d60919eae759ff4

Contents?: true

Size: 736 Bytes

Versions: 28

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

module Lutaml
  module Uml
    class Value
      include HasAttributes
      include HasMembers

      attr_accessor :definition,
                    :name,
                    :id,
                    :type

      # rubocop:disable Rails/ActiveRecordAliases
      def initialize(attributes = {})
        update_attributes(attributes)
      end
      # rubocop:enable Rails/ActiveRecordAliases

      def definition=(value)
        @definition = value
                        .to_s
                        .gsub(/\\}/, '}')
                        .gsub(/\\{/, '{')
                        .split("\n")
                        .map(&:strip)
                        .join("\n")
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

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