Class: Woody::Decorators::VideoTranscodingState
- Defined in:
- lib/woody/decorators/video_transcoding_state.rb
Instance Method Summary collapse
- #complete? ⇒ Boolean
-
#initialize(model, config) ⇒ VideoTranscodingState
constructor
A new instance of VideoTranscodingState.
- #path(filename, render_type = nil, default = '') ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(model, config) ⇒ VideoTranscodingState
Returns a new instance of VideoTranscodingState.
6 7 8 9 |
# File 'lib/woody/decorators/video_transcoding_state.rb', line 6 def initialize(model, config) @config = config super(model) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Woody::Decorators::Base
Instance Method Details
#complete? ⇒ Boolean
11 12 13 |
# File 'lib/woody/decorators/video_transcoding_state.rb', line 11 def complete? @model.state == 'complete' end |
#path(filename, render_type = nil, default = '') ⇒ Object
15 16 17 18 19 |
# File 'lib/woody/decorators/video_transcoding_state.rb', line 15 def path(filename, render_type = nil, default = '') type = render_type ? render_type : @model.type suffix = format_suffix(type) complete? ? [s3_base, filename, suffix].join('/') : default end |