Sha256: 60b7206c0d918bb171541f588b34fd4bfa772a93df6b2fceedb4e8b64f605c12

Contents?: true

Size: 1.05 KB

Versions: 35

Compression:

Stored size: 1.05 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
        items = []
        items.push(*@attributes)
        items.push(*@unique)
        items.push(*@where)
        items.push(*@informal_propositions)
        items
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
expressir-0.2.14-arm64-darwin lib/expressir/model/entity.rb
expressir-0.2.13 lib/expressir/model/entity.rb
expressir-0.2.13-x86_64-linux lib/expressir/model/entity.rb
expressir-0.2.13-x86_64-darwin lib/expressir/model/entity.rb
expressir-0.2.13-x86-mingw32 lib/expressir/model/entity.rb
expressir-0.2.13-x86-linux lib/expressir/model/entity.rb
expressir-0.2.13-x64-mingw32 lib/expressir/model/entity.rb
expressir-0.2.13-arm64-darwin lib/expressir/model/entity.rb
expressir-0.2.12 lib/expressir/model/entity.rb
expressir-0.2.12-x86_64-linux lib/expressir/model/entity.rb
expressir-0.2.12-x86_64-darwin lib/expressir/model/entity.rb
expressir-0.2.12-x86-mingw32 lib/expressir/model/entity.rb
expressir-0.2.12-x86-linux lib/expressir/model/entity.rb
expressir-0.2.12-x64-mingw32 lib/expressir/model/entity.rb
expressir-0.2.12-arm64-darwin lib/expressir/model/entity.rb