Class: Lutaml::Xsd::Commands::TypeCommand

Inherits:
Thor
  • Object
show all
Defined in:
lib/lutaml/xsd/commands/type_command.rb

Overview

Type query commands Handles finding and listing schema types

Defined Under Namespace

Classes: BatchFindCommand, DependenciesCommand, DependentsCommand, FindCommand, HierarchyCommand, ListCommand

Instance Method Summary collapse

Instance Method Details

#dependencies(qname, package_path) ⇒ Object



117
118
119
# File 'lib/lutaml/xsd/commands/type_command.rb', line 117

def dependencies(qname, package_path)
  DependenciesCommand.new(qname, package_path, options).run
end

#dependents(qname, package_path) ⇒ Object



141
142
143
# File 'lib/lutaml/xsd/commands/type_command.rb', line 141

def dependents(qname, package_path)
  DependentsCommand.new(qname, package_path, options).run
end

#find(qname_or_package = nil, package_path = nil) ⇒ Object



43
44
45
46
47
48
49
50
51
52
# File 'lib/lutaml/xsd/commands/type_command.rb', line 43

def find(qname_or_package = nil, package_path = nil)
  # Handle both single and batch modes
  if options[:batch] || options[:batch_file]
    # Batch mode: qname_or_package is actually the package path
    BatchFindCommand.new(qname_or_package, options).run
  else
    # Single mode: original behavior
    FindCommand.new(qname_or_package, package_path, options).run
  end
end

#hierarchy(qname, package_path) ⇒ Object



180
181
182
# File 'lib/lutaml/xsd/commands/type_command.rb', line 180

def hierarchy(qname, package_path)
  HierarchyCommand.new(qname, package_path, options).run
end

#list(package_file) ⇒ Object



80
81
82
# File 'lib/lutaml/xsd/commands/type_command.rb', line 80

def list(package_file)
  ListCommand.new(package_file, options).run
end