Sha256: 98cc2c2c087fe3d1992e3a12b8d9f4147035e6be6ec6a311f3b75c7465a99bb0

Contents?: true

Size: 673 Bytes

Versions: 23

Compression:

Stored size: 673 Bytes

Contents

# frozen_string_literal: true

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

module AppStoreConnect
  class Schema
    attr_reader :types, :web_service_endpoints, :objects

    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 |options|
        WebServiceEndpoint.new(options)
      end
      @objects = schema[:objects].map do |options|
        Object.new(options)
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
app_store_connect-0.38.0 lib/app_store_connect/schema.rb
app_store_connect-0.37.0 lib/app_store_connect/schema.rb
app_store_connect-0.36.0 lib/app_store_connect/schema.rb
app_store_connect-0.35.0 lib/app_store_connect/schema.rb
app_store_connect-0.34.0 lib/app_store_connect/schema.rb
app_store_connect-0.33.0 lib/app_store_connect/schema.rb
app_store_connect-0.32.0 lib/app_store_connect/schema.rb
app_store_connect-0.30.0 lib/app_store_connect/schema.rb
app_store_connect-0.29.0 lib/app_store_connect/schema.rb
app_store_connect-0.28.0 lib/app_store_connect/schema.rb
app_store_connect-0.27.0 lib/app_store_connect/schema.rb
app_store_connect-0.26.0 lib/app_store_connect/schema.rb
app_store_connect-0.25.0 lib/app_store_connect/schema.rb
app_store_connect-0.23.0 lib/app_store_connect/schema.rb
app_store_connect-0.22.0 lib/app_store_connect/schema.rb
app_store_connect-0.21.0 lib/app_store_connect/schema.rb
app_store_connect-0.20.0 lib/app_store_connect/schema.rb
app_store_connect-0.19.0 lib/app_store_connect/schema.rb
app_store_connect-0.18.0 lib/app_store_connect/schema.rb
app_store_connect-0.17.0 lib/app_store_connect/schema.rb