Sha256: 95ec90a8f68df402288075b9a107d748d4e052c0e5a6cd2c0627835512dd4c1d

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

module Analytics::IO
  # Config operates on .yml configuration file
  # inside project's root folder.
  class Config
    # A path to the .yml configuration file.
    CONFIG_PATH = "#{PROJ_DIR}/analytics.yml".freeze

    # Writes to a configuration file.
    def self.write(data)
      File.open(CONFIG_PATH, 'w') { |file| YAML.dump(data, file) }
    end

    # Reads the configuration file.
    def self.read
      YAML.load_file(CONFIG_PATH)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ios_analytics_cli-1.1.0 lib/ios_analytics_cli/io/config.rb
ios_analytics_cli-1.0.0 lib/ios_analytics_cli/io/config.rb