Class: Lutaml::Xsd::Commands::ElementCommand::ByNamespaceCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Lutaml::Xsd::Commands::ElementCommand::ByNamespaceCommand
- Defined in:
- lib/lutaml/xsd/commands/element_command.rb
Overview
ByNamespace command implementation
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
-
#initialize(package_path, options) ⇒ ByNamespaceCommand
constructor
A new instance of ByNamespaceCommand.
- #run ⇒ Object
Constructor Details
#initialize(package_path, options) ⇒ ByNamespaceCommand
Returns a new instance of ByNamespaceCommand.
555 556 557 558 |
# File 'lib/lutaml/xsd/commands/element_command.rb', line 555 def initialize(package_path, ) super() @package_path = package_path end |
Instance Method Details
#run ⇒ Object
560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/lutaml/xsd/commands/element_command.rb', line 560 def run repository = load_repository(@package_path) repository = ensure_resolved(repository) elements = repository.elements_by_namespace( namespace_uri: [:namespace], ) case [:format] when "json", "yaml" output format_output(elements, [:format]) else display_text_output(elements, repository) end end |