26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/mt_tool/commands.rb', line 26
def vmod
name = options[:name]
author = options[:author]
path = options[:path]
@logger.debug "====== VIPER Module Generation Started ======"
@logger.debug "Command Parameters:"
@logger.debug " - Module name: #{name}"
@logger.debug " - Author: #{author}"
@logger.debug " - Path: #{path}"
@logger.debug "Thor Options: #{options.inspect}"
@logger.debug "Thor Arguments: #{args.inspect}"
begin
@logger.debug "Creating new Module instance..."
module_instance = Module.new(self.args, self.options)
@logger.debug "Calling create_viper_module..."
module_instance.create_viper_module(path, name, "swift", "", author)
@logger.info "Successfully generated VIPER module: #{name}"
@logger.debug "====== VIPER Module Generation Completed ======"
rescue => e
@logger.error "Failed to generate VIPER module: #{e.message}"
@logger.debug "Error backtrace:"
@logger.debug e.backtrace.join("\n")
@logger.debug "====== VIPER Module Generation Failed ======"
raise e
end
end
|