Sha256: ecdf458edcf6ced8b7975fa315ef62396aa4ccd02daf5eea81a5d7ddf2a6c6f5

Contents?: true

Size: 716 Bytes

Versions: 5

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

#
# Copyright (c) 2019-present, Blue Marble Payroll, LLC
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#

require_relative 'constraints/reference'
require_relative 'constraints/static'

module Dbee
  class Model
    # Top-level class that allows for the making of constraints.  For example,
    # you can call this as:
    # - Constraints.make(type: :reference, name: :id, parent: some_id)
    # - Constraints.make(type: :static, name: :genre, value: :comedy)
    class Constraints
      acts_as_hashable_factory

      register 'reference', Reference
      register 'static',    Static
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dbee-1.0.0 lib/dbee/model/constraints.rb
dbee-1.0.0.pre.alpha.3 lib/dbee/model/constraints.rb
dbee-1.0.0.pre.alpha.2 lib/dbee/model/constraints.rb
dbee-1.0.0.pre.alpha.1 lib/dbee/model/constraints.rb
dbee-1.0.0.pre.alpha lib/dbee/model/constraints.rb