Class: Animoto::Resources::Jobs::StoryboardUnbundling

Inherits:
Base
  • Object
show all
Defined in:
lib/animoto/resources/jobs/storyboard_unbundling.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.



17
18
19
# File 'lib/animoto/resources/jobs/storyboard_unbundling.rb', line 17

def storyboard
  @storyboard
end

#storyboard_urlString (readonly)

The URL to the storyboard resource.

Returns:

  • (String)


21
22
23
# File 'lib/animoto/resources/jobs/storyboard_unbundling.rb', line 21

def storyboard_url
  @storyboard_url
end

Class Method Details

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

Returns:

  • (Hash{Symbol=>Object})

See Also:

  • Support::StandardEvelope::ClassMethods#unpack_standard_envelope


8
9
10
11
12
13
# File 'lib/animoto/resources/jobs/storyboard_unbundling.rb', line 8

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

Instance Method Details

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

Returns:

See Also:

  • Jobs::Base#instantiate


25
26
27
28
29
# File 'lib/animoto/resources/jobs/storyboard_unbundling.rb', line 25

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