Class: Lutaml::Xsd::Commands::ElementCommand::UsageCommand

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

Overview

Usage command implementation

Instance Attribute Summary

Attributes inherited from BaseCommand

#options

Instance Method Summary collapse

Constructor Details

#initialize(element_name, package_file, options) ⇒ UsageCommand

Returns a new instance of UsageCommand.



517
518
519
520
521
# File 'lib/lutaml/xsd/commands/element_command.rb', line 517

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

Instance Method Details

#runObject



523
524
525
526
527
528
# File 'lib/lutaml/xsd/commands/element_command.rb', line 523

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

  show_element_usage(repository)
end