Sha256: 77e492777f362ecba2f2aad8923b8fae1a7cfb1499c38404d7c7d70e53d55adf

Contents?: true

Size: 1.35 KB

Versions: 171

Compression:

Stored size: 1.35 KB

Contents

module Expressir
  module Model
    module Declarations
      # Specified in ISO 10303-11:2004
      # - section 9.2.1 Attributes
      class Attribute < Declaration
        include Identifier

        EXPLICIT = :EXPLICIT
        DERIVED = :DERIVED
        INVERSE = :INVERSE

        model_attr_accessor :kind, ':EXPLICIT, :DERIVED, :INVERSE'
        model_attr_accessor :supertype_attribute, 'Reference'
        model_attr_accessor :optional, 'Boolean'
        model_attr_accessor :type, 'DataType'
        model_attr_accessor :expression, 'Expression'

        # @param [Hash] options
        # @option (see Identifier#initialize_identifier)
        # @option options [:EXPLICIT, :DERIVED, :INVERSE] :kind
        # @option options [Reference] :supertype_attribute
        # @option options [Boolean] :optional
        # @option options [DataType] :type
        # @option options [Expression] :operand
        def initialize(options = {})
          initialize_identifier(options)

          @kind = options[:kind]
          @supertype_attribute = options[:supertype_attribute]
          @optional = options[:optional]
          @type = options[:type]
          @expression = options[:expression]

          super
        end

        # @return [Array<Declaration>]
        def children
          [
            *remark_items
          ]
        end
      end
    end
  end
end

Version data entries

171 entries across 171 versions & 1 rubygems

Version Path
expressir-2.1.0 lib/expressir/model/declarations/attribute.rb
expressir-2.0.0 lib/expressir/model/declarations/attribute.rb
expressir-1.4.2 lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-x86_64-linux-musl lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-x86_64-linux-gnu lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-x86_64-darwin lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-x64-mingw32 lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-x64-mingw-ucrt lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-arm64-darwin lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-aarch64-linux-musl lib/expressir/model/declarations/attribute.rb
expressir-1.4.2-aarch64-linux-gnu lib/expressir/model/declarations/attribute.rb
expressir-1.4.1 lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-x86_64-linux-musl lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-x86_64-linux-gnu lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-x86_64-darwin lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-x64-mingw32 lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-x64-mingw-ucrt lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-arm64-darwin lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-aarch64-linux-musl lib/expressir/model/declarations/attribute.rb
expressir-1.4.1-aarch64-linux-gnu lib/expressir/model/declarations/attribute.rb