Class: Lutaml::Xsd::Commands::ElementCommand::ListCommand

Inherits:
BaseCommand
  • Object
show all
Defined in:
lib/lutaml/xsd/commands/element_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.



142
143
144
145
# File 'lib/lutaml/xsd/commands/element_command.rb', line 142

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

Instance Method Details

#runObject



147
148
149
150
151
152
# File 'lib/lutaml/xsd/commands/element_command.rb', line 147

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

  list_elements(repository)
end