Class: Lutaml::Xsd::Commands::BaseCommand

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

Overview

Base class for all CLI commands Provides common functionality for error handling and output formatting

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ BaseCommand

Returns a new instance of BaseCommand.



15
16
17
# File 'lib/lutaml/xsd/commands/base_command.rb', line 15

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



13
14
15
# File 'lib/lutaml/xsd/commands/base_command.rb', line 13

def options
  @options
end

Instance Method Details

#runObject

Run the command Must be implemented by subclasses

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/lutaml/xsd/commands/base_command.rb', line 21

def run
  raise NotImplementedError, "Subclass must implement #run method"
end