Sha256: 6d9f174609f451a51555be0bdbccc104dfcf369f97bd92a6e3e7d1fe734ca6c9

Contents?: true

Size: 1.04 KB

Versions: 56

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/configs'
require 'eac_ruby_utils/core_ext'

module EacRubyUtils
  module Console
    class Configs
      require_sub __FILE__
      enable_console_speaker

      class << self
        def entry_key_to_envvar_name(entry_key)
          ::EacRubyUtils::Console::Configs::EntryReader.entry_key_to_envvar_name(entry_key)
        end
      end

      attr_reader :configs

      def initialize(configs_key, options = {})
        options.assert_argument(::Hash, 'options')
        @configs = ::EacRubyUtils::Configs.new(configs_key, options.merge(autosave: true))
      end

      def read_password(entry_key, options = {})
        ::EacRubyUtils::Console::Configs::PasswordEntryReader.new(self, entry_key, options).read
      end

      def read_entry(entry_key, options = {})
        ::EacRubyUtils::Console::Configs::EntryReader.new(self, entry_key, options).read
      end

      def store_passwords?
        ::EacRubyUtils::Console::Configs::StorePasswordsEntryReader.new(self) == 'yes'
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
eac_ruby_utils-0.58.1 lib/eac_ruby_utils/console/configs.rb
avm-tools-0.88.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
avm-tools-0.87.1 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
ehbrs-tools-0.19.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
eac_ruby_utils-0.58.0 lib/eac_ruby_utils/console/configs.rb
ehbrs-tools-0.18.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
eac_ruby_utils-0.57.2 lib/eac_ruby_utils/console/configs.rb
avm-tools-0.87.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
eac_ruby_utils-0.57.1 lib/eac_ruby_utils/console/configs.rb
eac_ruby_utils-0.57.0 lib/eac_ruby_utils/console/configs.rb
ehbrs-tools-0.17.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
avm-tools-0.86.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
avm-tools-0.85.1 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
eac_ruby_utils-0.56.2 lib/eac_ruby_utils/console/configs.rb
avm-tools-0.85.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
eac_ruby_utils-0.56.1 lib/eac_ruby_utils/console/configs.rb
ehbrs-tools-0.16.5 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
avm-tools-0.84.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb
eac_ruby_utils-0.56.0 lib/eac_ruby_utils/console/configs.rb
avm-tools-0.83.0 vendor/eac_ruby_utils/lib/eac_ruby_utils/console/configs.rb