Class: Lutaml::Xsd::Commands::ElementCommand::TreeCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Lutaml::Xsd::Commands::ElementCommand::TreeCommand
- Defined in:
- lib/lutaml/xsd/commands/element_command.rb
Overview
Tree command implementation
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
-
#initialize(element_name, package_file, options) ⇒ TreeCommand
constructor
A new instance of TreeCommand.
- #run ⇒ Object
Constructor Details
#initialize(element_name, package_file, options) ⇒ TreeCommand
Returns a new instance of TreeCommand.
399 400 401 402 403 404 |
# File 'lib/lutaml/xsd/commands/element_command.rb', line 399 def initialize(element_name, package_file, ) super() @element_name = element_name @package_file = package_file @max_depth = [:depth] || 3 end |
Instance Method Details
#run ⇒ Object
406 407 408 409 410 411 |
# File 'lib/lutaml/xsd/commands/element_command.rb', line 406 def run repository = load_repository(@package_file) repository = ensure_resolved(repository) display_element_tree(repository) end |