codeclimate/codeclimate

View on GitHub
lib/cc/config/json_adapter.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module CC
  class Config
    class JSONAdapter < Config
      DEFAULT_PATH = ".codeclimate.json".freeze

      attr_reader :config

      def self.load(path = DEFAULT_PATH)
        new(::JSON.parse(File.open(path).read))
      end

      def initialize(json = {})
        @config = json
      end
    end
  end
end