Sha256: edfbd8f3e4384711807a44d2fa154b46a6783276c1c4168ce0bbf2fc8725771d

Contents?: true

Size: 389 Bytes

Versions: 5

Compression:

Stored size: 389 Bytes

Contents

# frozen_string_literal: true

module Riserva::Storage
  class ApplicationStorage
    def initialize(secrets = nil)
      @secrets = secrets || config_secrets
    end

    def title
      self.class.name.split('::').last.underscore
    end

    protected

    attr_reader :secrets

    def config_secrets
      Riserva::Config.read([:storage, title, :secrets].join('.'))
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
riserva-0.1.4 lib/riserva/storage/application_storage.rb
riserva-0.1.3 lib/riserva/storage/application_storage.rb
riserva-0.1.2 lib/riserva/storage/application_storage.rb
riserva-0.1.1 lib/riserva/storage/application_storage.rb
riserva-0.1.0 lib/riserva/storage/application_storage.rb