You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::Resources::Definition
- Inherits:
-
Object
- Object
- Aws::Resources::Definition
- Defined in:
- aws-sdk-resources/lib/aws-sdk-resources/definition.rb
Overview
Given a resource definition document, a Definition can build a set of related resource classes.
Instance Method Summary collapse
-
#apply(namespace) ⇒ void
-
#initialize(definition = {}, options = {}) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(definition = {}, options = {}) ⇒ Definition
Returns a new instance of Definition.
12 13 14 15 |
# File 'aws-sdk-resources/lib/aws-sdk-resources/definition.rb', line 12 def initialize(definition = {}, = {}) @source = definition @source_path = [:source_path] end |
Instance Method Details
#apply(namespace) ⇒ void
This method returns an undefined value.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'aws-sdk-resources/lib/aws-sdk-resources/definition.rb', line 19 def apply(namespace) build_resource_classes(namespace) each_resource_class(namespace) do |resource, definition| define_load(namespace, resource, definition['load']) define_actions(namespace, resource, definition['actions'] || {}) define_batch_actions(namespace, resource, definition['batchActions'] || {}) define_waiters(namespace, resource, definition['waiters'] || {}) define_has(namespace, resource, definition['has'] || {}) define_has_many(namespace, resource, definition['hasMany'] || {}) define_data_attributes(namespace, resource, definition) end end |