Class: Lutaml::Xsd::Commands::ElementCommand::ShowCommand

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

Overview

Show command implementation

Instance Attribute Summary

Attributes inherited from BaseCommand

#options

Instance Method Summary collapse

Constructor Details

#initialize(element_name, package_file, options) ⇒ ShowCommand

Returns a new instance of ShowCommand.



265
266
267
268
269
# File 'lib/lutaml/xsd/commands/element_command.rb', line 265

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

Instance Method Details

#runObject



271
272
273
274
275
276
# File 'lib/lutaml/xsd/commands/element_command.rb', line 271

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

  show_element(repository)
end