Sha256: 74a7f34aac03ec0c37b33b4e7406eaf9c40ba994ff48d0df7c90e21652f166c9

Contents?: true

Size: 443 Bytes

Versions: 2

Compression:

Stored size: 443 Bytes

Contents

# frozen_string_literal: true

module Parametric
  # Field DSL
  # host instance must implement:
  # #meta(options Hash)
  # #policy(key Symbol) self
  #
  module FieldDSL
    def required
      policy :required
    end

    def present
      required.policy :present
    end

    def declared
      policy :declared
    end

    def options(opts)
      policy :options, opts
    end

    def nullable
      policy :nullable
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
parametric-0.2.21 lib/parametric/field_dsl.rb
parametric-0.2.20 lib/parametric/field_dsl.rb