class Sekrit::Config

Attributes

bundled_files[R]
bundles[R]
passphrase[R]
raw[R]
repo[R]
shared_files[R]

Public Class Methods

new(path: 'Sekritfile') click to toggle source
# File lib/sekrit/config.rb, line 13
def initialize(path: 'Sekritfile')
  @raw = File.read(path)
  config = YAML::load_file(path)
  @bundled_files = Bundle.new(hash: config['bundled_files']) unless config['bundled_files'].nil?
  @bundles       = (config['bundles'] || []).map { |b| Bundle.new(hash: b) }
  @passphrase    = config['passphrase']
  @repo          = config['repo']
  @shared_files  = Bundle.new(hash: config['shared_files']) unless config['shared_files'].nil?
end