Class: Lutaml::Xsd::Commands::GenerateSpaCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Lutaml::Xsd::Commands::GenerateSpaCommand
- Defined in:
- lib/lutaml/xsd/commands/generate_spa_command.rb
Overview
CLI command for generating SPA documentation
Generates interactive HTML Single Page Application documentation from XSD schemas with Vue.js frontend.
Instance Attribute Summary collapse
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#package_path ⇒ Object
readonly
Returns the value of attribute package_path.
Attributes inherited from BaseCommand
Instance Method Summary collapse
-
#initialize(package_path, options = {}) ⇒ GenerateSpaCommand
constructor
Initialize spa command.
-
#run ⇒ void
Run SPA generation command.
Constructor Details
#initialize(package_path, options = {}) ⇒ GenerateSpaCommand
Initialize spa command
20 21 22 23 24 |
# File 'lib/lutaml/xsd/commands/generate_spa_command.rb', line 20 def initialize(package_path, = {}) super() @package_path = package_path @output_path = [:output] end |
Instance Attribute Details
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
14 15 16 |
# File 'lib/lutaml/xsd/commands/generate_spa_command.rb', line 14 def output_path @output_path end |
#package_path ⇒ Object (readonly)
Returns the value of attribute package_path.
14 15 16 |
# File 'lib/lutaml/xsd/commands/generate_spa_command.rb', line 14 def package_path @package_path end |
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Run SPA generation command
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/lutaml/xsd/commands/generate_spa_command.rb', line 29 def run validate_inputs package = load_package generator = create_generator(package) output_files = generator.generate display_results(output_files) rescue StandardError => e error "SPA generation failed: #{e.}" verbose_output e.backtrace.join("\n") if verbose? exit 1 end |