Sha256: a046fbec6f73160ce78e89ae863022279832d25ef0710810db22704cbaae2147

Contents?: true

Size: 927 Bytes

Versions: 23

Compression:

Stored size: 927 Bytes

Contents

# frozen_string_literal: true

module Appydave
  module Tools
    module Configuration
      module Models
        # Global settings that can be referenced by other configurations or tools
        class SettingsConfig < ConfigBase
          def set(key, value)
            data[key] = value
          end

          def get(key, default = nil)
            data.fetch(key, default)
          end

          # Well known settings

          def ecamm_recording_folder
            get('ecamm-recording-folder')
          end

          def download_folder
            get('download-folder')
          end

          def download_image_folder
            get('download-image-folder') || download_folder
          end

          def print
            log.subheading 'Settings Configuration'

            data.each do |key, value|
              log.kv key, value
            end
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
appydave-tools-0.11.9 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.8 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.7 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.6 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.5 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.4 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.3 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.2 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.1 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.11.0 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.10.4 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.10.3 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.10.2 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.10.1 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.10.0 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.9.5 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.9.4 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.9.3 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.9.2 lib/appydave/tools/configuration/models/settings_config.rb
appydave-tools-0.9.1 lib/appydave/tools/configuration/models/settings_config.rb