Class: Lutaml::Xsd::Commands::NamespaceCommand::ListCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/lutaml/xsd/commands/namespace_command.rb

Overview

List command implementation

Instance Attribute Summary

Attributes inherited from BaseCommand

#options

Instance Method Summary collapse

Constructor Details

#initialize(package_file, options) ⇒ ListCommand

Returns a new instance of ListCommand.



155
156
157
158
# File 'lib/lutaml/xsd/commands/namespace_command.rb', line 155

def initialize(package_file, options)
  super(options)
  @package_file = package_file
end

Instance Method Details

#runObject



160
161
162
163
164
165
# File 'lib/lutaml/xsd/commands/namespace_command.rb', line 160

def run
  repository = load_repository(@package_file)
  repository = ensure_resolved(repository)

  list_namespaces(repository)
end