Class: Animoto::Resources::Jobs::Directing

Inherits:
Base
  • Object
show all
Defined in:
lib/animoto/resources/jobs/directing.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#errors, #state, #url

Attributes inherited from Base

#errors, #url

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#completed?, endpoint, #failed?, infer_content_type, infer_endpoint, #pending?

Methods inherited from Base

endpoint, #endpoint, #initialize, #load, load, new, original_new, register

Methods included from Support::StandardEnvelope

find_class_for, included

Constructor Details

This class inherits a constructor from Animoto::Resources::Base

Instance Attribute Details

#storyboardResources::Storyboard (readonly)

The Storyboard created by this job.



14
15
16
# File 'lib/animoto/resources/jobs/directing.rb', line 14

def storyboard
  @storyboard
end

#storyboard_urlString (readonly)

The URL for this storyboard resource created by this job.

Returns:

  • (String)


18
19
20
# File 'lib/animoto/resources/jobs/directing.rb', line 18

def storyboard_url
  @storyboard_url
end

Class Method Details

.unpack_standard_envelope(body) ⇒ Hash{Symbol=>Object}

Returns:

  • (Hash{Symbol=>Object})

See Also:

  • Support::StandardEnvelope::ClassMethods#unpack_standard_envelope


8
9
10
# File 'lib/animoto/resources/jobs/directing.rb', line 8

def self.unpack_standard_envelope body
  super.merge(:storyboard_url => unpack_links(body)['storyboard'])
end

Instance Method Details

#instantiate(attributes = {}) ⇒ Jobs::Directing

Returns:

See Also:

  • Jobs::Base#instantiate


22
23
24
25
26
# File 'lib/animoto/resources/jobs/directing.rb', line 22

def instantiate attributes = {}
  @storyboard_url = attributes[:storyboard_url]
  @storyboard = Animoto::Resources::Storyboard.new(:url => @storyboard_url) if @storyboard_url
  super
end