Class: AppStoreDevApi::Schema
- Inherits:
-
Object
- Object
- AppStoreDevApi::Schema
- Defined in:
- lib/app_store_dev_api/schema.rb,
lib/app_store_dev_api/schema/type.rb,
lib/app_store_dev_api/schema/object.rb,
lib/app_store_dev_api/schema/web_service_endpoint.rb
Defined Under Namespace
Classes: Object, Type, WebServiceEndpoint
Instance Attribute Summary collapse
-
#objects ⇒ Object
readonly
Returns the value of attribute objects.
-
#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.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/app_store_dev_api/schema.rb', line 11 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 || WebServiceEndpoint.new() end @objects = schema[:objects].map do || Object.new() end end |
Instance Attribute Details
#objects ⇒ Object (readonly)
Returns the value of attribute objects.
9 10 11 |
# File 'lib/app_store_dev_api/schema.rb', line 9 def objects @objects end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
9 10 11 |
# File 'lib/app_store_dev_api/schema.rb', line 9 def types @types end |
#web_service_endpoints ⇒ Object (readonly)
Returns the value of attribute web_service_endpoints.
9 10 11 |
# File 'lib/app_store_dev_api/schema.rb', line 9 def web_service_endpoints @web_service_endpoints end |