Class: Triangulum::Validation
- Inherits:
-
Object
- Object
- Triangulum::Validation
- Includes:
- Executor
- Defined in:
- lib/triangulum/validation.rb
Overview
Triangulum::Validation
This class implements the validation using the typescript package
Defined Under Namespace
Classes: Diagnostic, Result
Constant Summary collapse
- ENTRYPOINT =
File.('js/single-validation.js', __dir__)
Constants included from Executor
Executor::BUN_EXE, Executor::IS_RUBY_PLATFORM_GEM
Instance Attribute Summary collapse
-
#data_types ⇒ Object
readonly
Returns the value of attribute data_types.
-
#flow ⇒ Object
readonly
Returns the value of attribute flow.
-
#function_definitions ⇒ Object
readonly
Returns the value of attribute function_definitions.
Instance Method Summary collapse
-
#initialize(flow, runtime_function_definitions, data_types) ⇒ Validation
constructor
A new instance of Validation.
- #validate ⇒ Object
Methods included from Executor
Constructor Details
#initialize(flow, runtime_function_definitions, data_types) ⇒ Validation
Returns a new instance of Validation.
16 17 18 19 20 |
# File 'lib/triangulum/validation.rb', line 16 def initialize(flow, runtime_function_definitions, data_types) @flow = flow @function_definitions = runtime_function_definitions @data_types = data_types end |
Instance Attribute Details
#data_types ⇒ Object (readonly)
Returns the value of attribute data_types.
14 15 16 |
# File 'lib/triangulum/validation.rb', line 14 def data_types @data_types end |
#flow ⇒ Object (readonly)
Returns the value of attribute flow.
14 15 16 |
# File 'lib/triangulum/validation.rb', line 14 def flow @flow end |
#function_definitions ⇒ Object (readonly)
Returns the value of attribute function_definitions.
14 15 16 |
# File 'lib/triangulum/validation.rb', line 14 def function_definitions @function_definitions end |
Instance Method Details
#validate ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/triangulum/validation.rb', line 22 def validate input = serialize_input output = run_ts_triangulum(ENTRYPOINT, input) parse_output(output) end |