Sha256: e21c305b033fa488ba00b2f3146f6da4fc413088a01dc099a96bcdac651f2a6f

Contents?: true

Size: 623 Bytes

Versions: 10

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

# @api private
# @since 0.21.0
module Qonfig::DSL::Inheritance
  class << self
    # @option base [Class<Qonfig::DataSet>, Class<Qonfig::Compacted>]
    # @option child [Class<Qonfig::DataSet>, Class<Qonfig::Compacted>]
    # @return [void]
    #
    # @api private
    # @since 0.21.0
    def inherit(base:, child:)
      child.definition_commands.concat(base.definition_commands)
      child.instance_commands.concat(base.instance_commands, &:inheritable?)
      child.predefined_validators.merge(base.predefined_validators)
      child.validators.concat(base.validators)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
qonfig-0.30.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.28.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.27.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.26.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.25.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.24.1 lib/qonfig/dsl/inheritance.rb
qonfig-0.24.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.23.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.22.0 lib/qonfig/dsl/inheritance.rb
qonfig-0.21.0 lib/qonfig/dsl/inheritance.rb