Sha256: c4707487525563df4f2acc2debf0b881c44c3a9c63a3cb4618abd6ec31e29b5f

Contents?: true

Size: 524 Bytes

Versions: 5

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

require 'app_store_connect/schema/type'
require 'app_store_connect/schema/web_service_endpoint'

module AppStoreConnect
  class Schema
    attr_reader :types, :web_service_endpoints

    def initialize(path)
      schema = JSON.parse(File.read(path)).deep_symbolize_keys
      @types = schema[:types].map do |options|
        Type.new(**options)
      end
      @web_service_endpoints = schema[:web_service_endpoints].map do |s|
        WebServiceEndpoint.new(**s)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
app_store_connect-0.13.0 lib/app_store_connect/schema.rb
app_store_connect-0.12.2 lib/app_store_connect/schema.rb
app_store_connect-0.12.1 lib/app_store_connect/schema.rb
app_store_connect-0.12.0 lib/app_store_connect/schema.rb
app_store_connect-0.11.0 lib/app_store_connect/schema.rb