Sha256: 6f7e4e19fb81c31784eb720df4279cdd190dfe815aed1ce307b64ddb73d118a4
Contents?: true
Size: 460 Bytes
Versions: 16
Compression:
Stored size: 460 Bytes
Contents
# frozen_string_literal: true module EacCli class DocoptRunner PROGRAM_MACRO = '__PROGRAM__' def source_doc setting_value(:doc) end def target_doc source_doc.gsub(PROGRAM_MACRO, target_program_name).strip + "\n" end def source_program_name setting_value(:program_name, false) end def target_program_name [source_program_name, ENV['PROGRAM_NAME'], $PROGRAM_NAME].find(&:present?) end end end
Version data entries
16 entries across 16 versions & 3 rubygems