Class: NxtSchema::Node::Leaf

Inherits:
Base
  • Object
show all
Defined in:
lib/nxt_schema/node/leaf.rb

Instance Attribute Summary

Attributes inherited from Base

#coerced, #coerced_nodes, #context, #error_key, #errors, #index, #input, #locale, #node, #output, #parent, #root

Instance Method Summary collapse

Methods inherited from Base

#add_error, #add_schema_error, #initialize, #merge_errors, #root?, #run_validations, #up, #valid?

Constructor Details

This class inherits a constructor from NxtSchema::Node::Base

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
12
# File 'lib/nxt_schema/node/leaf.rb', line 4

def call
  apply_on_evaluators
  return self if maybe_evaluator_applies?

  coerce_input
  register_as_coerced_when_no_errors
  run_validations
  self
end