Sha256: d5d3888d7b550a7f00c3a81062fd0c93eeaab98011106fc44426cf8300c6ccb8

Contents?: true

Size: 1 KB

Versions: 28

Compression:

Stored size: 1 KB

Contents

module Expressir
  module Model
    class Entity < ModelElement
      include Identifier

      attr_accessor :abstract
      attr_accessor :supertype_expression
      attr_accessor :subtype_of
      attr_accessor :attributes
      attr_accessor :unique
      attr_accessor :where
      attr_accessor :informal_propositions

      def initialize(options = {})
        @id = options[:id]
        @remarks = options.fetch(:remarks, [])
        @source = options[:source]

        @abstract = options[:abstract]
        @supertype_expression = options[:supertype_expression]
        @subtype_of = options.fetch(:subtype_of, [])
        @attributes = options.fetch(:attributes, [])
        @unique = options.fetch(:unique, [])
        @where = options.fetch(:where, [])
        @informal_propositions = options.fetch(:informal_propositions, [])

        super
      end

      def children
        [
          *attributes,
          *unique,
          *where,
          *informal_propositions
        ]
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
expressir-0.2.21 lib/expressir/model/entity.rb
expressir-0.2.21-x86_64-linux lib/expressir/model/entity.rb
expressir-0.2.21-x86_64-darwin lib/expressir/model/entity.rb
expressir-0.2.21-x86-mingw32 lib/expressir/model/entity.rb
expressir-0.2.21-x86-linux lib/expressir/model/entity.rb
expressir-0.2.21-x64-mingw32 lib/expressir/model/entity.rb
expressir-0.2.21-arm64-darwin lib/expressir/model/entity.rb
expressir-0.2.19 lib/expressir/model/entity.rb
expressir-0.2.19-x86_64-linux lib/expressir/model/entity.rb
expressir-0.2.19-x86_64-darwin lib/expressir/model/entity.rb
expressir-0.2.19-x86-mingw32 lib/expressir/model/entity.rb
expressir-0.2.19-x86-linux lib/expressir/model/entity.rb
expressir-0.2.19-x64-mingw32 lib/expressir/model/entity.rb
expressir-0.2.19-arm64-darwin lib/expressir/model/entity.rb
expressir-0.2.18 lib/expressir/model/entity.rb
expressir-0.2.18-x86_64-linux lib/expressir/model/entity.rb
expressir-0.2.18-x86_64-darwin lib/expressir/model/entity.rb
expressir-0.2.18-x86-mingw32 lib/expressir/model/entity.rb
expressir-0.2.18-x86-linux lib/expressir/model/entity.rb
expressir-0.2.18-x64-mingw32 lib/expressir/model/entity.rb