Class: Triangulum::Validation
- Inherits:
-
Object
- Object
- Triangulum::Validation
- Defined in:
- lib/triangulum/validation.rb
Overview
Triangulum::Validation
This class implements the validation using the typescript package
Defined Under Namespace
Classes: BunNotFound, Diagnostic, Result, TriangulumFailed
Constant Summary collapse
- ENTRYPOINT =
File.('js/single-validation.js', __dir__)
- BUN_EXE =
Dir.glob(File.('../../exe/*/bun', __dir__)).find do |path| platform = Gem::Platform.new(File.basename(File.dirname(path))) Gem::Platform.match_gem?(platform, Gem::Platform.local.to_s) end
- IS_RUBY_PLATFORM_GEM =
Dir.glob(File.('../../exe/*/bun', __dir__)).empty?
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
Constructor Details
#initialize(flow, runtime_function_definitions, data_types) ⇒ Validation
Returns a new instance of Validation.
26 27 28 29 30 |
# File 'lib/triangulum/validation.rb', line 26 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.
24 25 26 |
# File 'lib/triangulum/validation.rb', line 24 def data_types @data_types end |
#flow ⇒ Object (readonly)
Returns the value of attribute flow.
24 25 26 |
# File 'lib/triangulum/validation.rb', line 24 def flow @flow end |
#function_definitions ⇒ Object (readonly)
Returns the value of attribute function_definitions.
24 25 26 |
# File 'lib/triangulum/validation.rb', line 24 def function_definitions @function_definitions end |
Instance Method Details
#validate ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/triangulum/validation.rb', line 32 def validate input = serialize_input output = run_ts_triangulum(input) parse_output(output) end |