Module: SecretsManager::Helpers
- Included in:
- Cli::Base
- Defined in:
- lib/secrets_manager/helpers.rb
Instance Method Summary collapse
Instance Method Details
#write_to_file(content, file_path) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/secrets_manager/helpers.rb', line 5 def write_to_file(content, file_path) return false if content.nil? || content.empty? Pathname(file_path).dirname.mkpath File.open(File.join(Dir.pwd, file_path), 'w') do |f| f.puts content end true end |