Sha256: e932109f5a6174564fda9c290ed24931456808b62442369f5f659c650dab819f

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

require 'json'

module Tanuki
  module Universe
    class Config

      attr_reader :endpoints

      def initialize(config_path)
        @config_path = config_path
        parse_config_file
      end

      def parse_config_file
        parsed_config = {}
        File.open(@config_path) do |file|
          parsed_config = JSON.load(file)
        end
        global_config(parsed_config)
      end

      def global_config(config)
        @endpoints = config['endpoints']
        #@build_interval = config['build_interval']
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tanuki-universe-0.0.5 lib/tanuki/universe/config.rb
tanuki-universe-0.0.4 lib/tanuki/universe/config.rb
tanuki-universe-0.0.3 lib/tanuki/universe/config.rb