Class: Lutaml::Xsd::Commands::PackageCommand::SchemasCommand

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

Overview

Schemas command implementation

Instance Attribute Summary

Attributes inherited from BaseCommand

#options

Instance Method Summary collapse

Constructor Details

#initialize(package_file, options) ⇒ SchemasCommand

Returns a new instance of SchemasCommand.



863
864
865
866
# File 'lib/lutaml/xsd/commands/package_command.rb', line 863

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

Instance Method Details

#runObject



868
869
870
871
872
873
874
875
876
# File 'lib/lutaml/xsd/commands/package_command.rb', line 868

def run
  validate_file_exists

  if options[:classify]
    display_classification
  else
    list_schemas
  end
end