Class: Lutaml::Xsd::Commands::NamespaceCommand::RemapCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Lutaml::Xsd::Commands::NamespaceCommand::RemapCommand
- Defined in:
- lib/lutaml/xsd/commands/namespace_command.rb
Overview
Remap command implementation
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
-
#initialize(package_file, options) ⇒ RemapCommand
constructor
A new instance of RemapCommand.
- #run ⇒ Object
Constructor Details
#initialize(package_file, options) ⇒ RemapCommand
Returns a new instance of RemapCommand.
519 520 521 522 |
# File 'lib/lutaml/xsd/commands/namespace_command.rb', line 519 def initialize(package_file, ) super() @package_file = package_file end |
Instance Method Details
#run ⇒ Object
524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/lutaml/xsd/commands/namespace_command.rb', line 524 def run repository = load_repository(@package_file) repository = ensure_resolved(repository) # Parse change mappings changes = parse_changes([:change]) # Perform remapping remapped_repository = remap_prefixes(repository, changes) # Save to output file save_remapped_package(remapped_repository, [:output]) end |