Class: Parametric::NullablePolicy

Inherits:
Object
  • Object
show all
Defined in:
lib/parametric/nullable_policy.rb

Overview

A policy that allows a field to be nullable. Fields with nil values are not processed further, and the value is returned as-is.

Examples:

field(:age).nullable.type(:integer)
field(:age).nullable.type(:integer).required

Defined Under Namespace

Classes: Runner

Instance Method Summary collapse

Instance Method Details

#build(key, value, payload:, context:) ⇒ Object



13
14
15
# File 'lib/parametric/nullable_policy.rb', line 13

def build(key, value, payload:, context:)
  Runner.new(key, value, payload, context)
end

#meta_dataObject



11
# File 'lib/parametric/nullable_policy.rb', line 11

def ; {}; end