Class: Animoto::Manifests::Base Abstract
- Inherits:
-
Object
- Object
- Animoto::Manifests::Base
- Includes:
- Support::ContentType
- Defined in:
- lib/animoto/manifests/base.rb
Overview
Direct Known Subclasses
Directing, DirectingAndRendering, Rendering, StoryboardBundling, StoryboardUnbundling
Instance Attribute Summary collapse
-
#http_callback_format ⇒ String
The format of the callback; either ‘xml’ or ‘json’.
-
#http_callback_url ⇒ String
A URL to receive a callback after directing is finished.
-
#partner_metadata ⇒ Object
Returns the value of attribute partner_metadata.
Class Method Summary collapse
-
.associated_job_class ⇒ Class
Returns the Resources::Jobs::Base descendant class associated with this manifest class (that is, the type of job returned when a manifest of this type is posted).
- .infer_content_type ⇒ String
Instance Method Summary collapse
-
#associated_job_class ⇒ Class
Returns the Resources::Jobs::Base descendant class associated with this manifest (that is, the type of job that will be returned when this manifest is posted).
-
#initialize(options = {}) ⇒ Base
constructor
Creates a new manifest.
-
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this manifest as a Hash, used to populate request bodies when directing, rendering, etc.
Methods included from Support::ContentType
Constructor Details
#initialize(options = {}) ⇒ Base
Creates a new manifest
41 42 43 44 45 |
# File 'lib/animoto/manifests/base.rb', line 41 def initialize = {} @http_callback_url = [:http_callback_url] @http_callback_format = [:http_callback_format] @partner_metadata = [:partner_metadata] end |
Instance Attribute Details
#http_callback_format ⇒ String
The format of the callback; either ‘xml’ or ‘json’.
29 30 31 |
# File 'lib/animoto/manifests/base.rb', line 29 def http_callback_format @http_callback_format end |
#http_callback_url ⇒ String
A URL to receive a callback after directing is finished.
25 26 27 |
# File 'lib/animoto/manifests/base.rb', line 25 def http_callback_url @http_callback_url end |
#partner_metadata ⇒ Object
Returns the value of attribute partner_metadata.
31 32 33 |
# File 'lib/animoto/manifests/base.rb', line 31 def @partner_metadata end |
Class Method Details
.associated_job_class ⇒ Class
Returns the Resources::Jobs::Base descendant class associated with this manifest class (that is, the type of job returned when a manifest of this type is posted).
19 20 21 |
# File 'lib/animoto/manifests/base.rb', line 19 def self.associated_job_class Resources::Jobs.const_get(self.name.split('::').last) end |
.infer_content_type ⇒ String
9 10 11 |
# File 'lib/animoto/manifests/base.rb', line 9 def self.infer_content_type super + '_manifest' end |
Instance Method Details
#associated_job_class ⇒ Class
Returns the Resources::Jobs::Base descendant class associated with this manifest (that is, the type of job that will be returned when this manifest is posted).
59 60 61 |
# File 'lib/animoto/manifests/base.rb', line 59 def associated_job_class self.class.associated_job_class end |
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this manifest as a Hash, used to populate request bodies when directing, rendering, etc.
51 52 53 |
# File 'lib/animoto/manifests/base.rb', line 51 def to_hash {} end |