Module: Strata::CLI::Helpers::DescriptionHelper

Included in:
Main, SubCommands::Create, SubCommands::Datasource, SubCommands::Deploy, SubCommands::Table
Defined in:
lib/strata/cli/helpers/description_helper.rb

Instance Method Summary collapse

Instance Method Details

#long_desc_from_file(path) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/strata/cli/helpers/description_helper.rb', line 7

def long_desc_from_file(path)
  # Descriptions are in lib/strata/cli/descriptions/, not in helpers/
  descriptions_dir = File.join(File.dirname(__dir__), "descriptions")
  file_path = File.join(descriptions_dir, "#{path}.txt")
  if File.exist?(file_path)
    long_desc File.read(file_path)
  else
    warn "Warning: Description file not found at #{file_path}"
  end
end