Class: AppStoreConnect::Schema
- Inherits:
-
Object
- Object
- AppStoreConnect::Schema
- Defined in:
- lib/app_store_connect/schema.rb,
lib/app_store_connect/schema/type.rb,
lib/app_store_connect/schema/web_service_endpoint.rb
Defined Under Namespace
Classes: Type, WebServiceEndpoint
Instance Attribute Summary collapse
-
#types ⇒ Object
readonly
Returns the value of attribute types.
-
#web_service_endpoints ⇒ Object
readonly
Returns the value of attribute web_service_endpoints.
Instance Method Summary collapse
-
#initialize(path) ⇒ Schema
constructor
A new instance of Schema.
Constructor Details
#initialize(path) ⇒ Schema
Returns a new instance of Schema.
10 11 12 13 14 15 16 17 18 |
# File 'lib/app_store_connect/schema.rb', line 10 def initialize(path) schema = JSON.parse(File.read(path)).deep_symbolize_keys @types = schema[:types].map do || Type.new(**) end @web_service_endpoints = schema[:web_service_endpoints].map do |s| WebServiceEndpoint.new(**s) end end |
Instance Attribute Details
#types ⇒ Object (readonly)
Returns the value of attribute types.
8 9 10 |
# File 'lib/app_store_connect/schema.rb', line 8 def types @types end |
#web_service_endpoints ⇒ Object (readonly)
Returns the value of attribute web_service_endpoints.
8 9 10 |
# File 'lib/app_store_connect/schema.rb', line 8 def web_service_endpoints @web_service_endpoints end |