Method: Bcome::Node::MetaDataLoader#load_file_data_for
- Defined in:
- lib/objects/node/meta_data_loader.rb
#load_file_data_for(filepath) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/objects/node/meta_data_loader.rb', line 28 def load_file_data_for(filepath) if filepath =~ /.enc/ # encrypted file contents prompt_for_decryption_key unless decryption_key encrypted_contents = File.read(filepath) decrypted_contents = encrypted_contents.decrypt(decryption_key) return YAML.load(decrypted_contents) else # unencrypted return YAML.load_file(filepath) end end |