Class: Panda::Encoding
- Includes:
- ShortStatus
- Defined in:
- lib/panda/resources/encoding.rb
Constant Summary
Constants included from Router
Router::DEFAULT_FORMAT, Router::VAR_PATTERN
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ShortStatus
#fail?, #processing?, #success?
Methods inherited from Resource
#cloud, cloud, #create, #create!, #initialize, method_missing, #reload
Methods included from CloudConnection
Methods included from Finders::FindMany
Methods included from Associations
Methods included from Builders
Methods inherited from Base
#changed?, #delete, end_class_name, id, #id, #id=, #initialize, #new?, #reload, #to_json
Methods included from Router
Constructor Details
This class inherits a constructor from Panda::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Panda::Base
Class Method Details
.first ⇒ Object
24 25 26 |
# File 'lib/panda/resources/encoding.rb', line 24 def first EncodingScope.new(self).per_page(1).first end |
Instance Method Details
#screenshots ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/panda/resources/encoding.rb', line 12 def screenshots @screenshots ||= if status == 'success' (1..7).map do |i| "http://s3.amazonaws.com/#{cloud.s3_videos_bucket}/#{id}_#{i}.jpg" end else [] end end |
#url ⇒ Object
8 9 10 |
# File 'lib/panda/resources/encoding.rb', line 8 def url "http://s3.amazonaws.com/#{cloud.s3_videos_bucket}/#{id}#{extname}" end |