Class: SecureYaml::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/secure_yaml/loader.rb

Instance Method Summary collapse

Constructor Details

#initialize(yaml_decrypter) ⇒ Loader

Returns a new instance of Loader.



7
8
9
# File 'lib/secure_yaml/loader.rb', line 7

def initialize(yaml_decrypter)
  @yaml_decrypter = yaml_decrypter
end

Instance Method Details

#load(yaml_file) ⇒ Object



11
12
13
# File 'lib/secure_yaml/loader.rb', line 11

def load(yaml_file)
  @yaml_decrypter.decrypt(YAML::load(yaml_file))
end