Class: Pageflow::AudioFile
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Pageflow::AudioFile
- Includes:
- EncodedFileStateMachine, UploadedFile
- Defined in:
- app/models/pageflow/audio_file.rb
Instance Method Summary collapse
- #attachment ⇒ Object
- #attachment=(value) ⇒ Object
- #attachment_s3_url ⇒ Object
- #m4a ⇒ Object
- #meta_data_attributes=(attributes) ⇒ Object
- #mp3 ⇒ Object
- #ogg ⇒ Object
- #output_definition ⇒ Object
Methods included from UploadedFile
Instance Method Details
#attachment ⇒ Object
11 12 13 |
# File 'app/models/pageflow/audio_file.rb', line 11 def end |
#attachment=(value) ⇒ Object
15 16 17 |
# File 'app/models/pageflow/audio_file.rb', line 15 def (value) self. = value end |
#attachment_s3_url ⇒ Object
19 20 21 |
# File 'app/models/pageflow/audio_file.rb', line 19 def "s3://#{File.join(.bucket_name, .path)}" end |
#m4a ⇒ Object
23 24 25 |
# File 'app/models/pageflow/audio_file.rb', line 23 def m4a ZencoderAttachment.new(self, "audio.m4a") end |
#meta_data_attributes=(attributes) ⇒ Object
39 40 41 |
# File 'app/models/pageflow/audio_file.rb', line 39 def (attributes) self.attributes = attributes.symbolize_keys.slice(:format, :duration_in_ms) end |
#mp3 ⇒ Object
27 28 29 |
# File 'app/models/pageflow/audio_file.rb', line 27 def mp3 ZencoderAttachment.new(self, "audio.mp3") end |
#ogg ⇒ Object
31 32 33 |
# File 'app/models/pageflow/audio_file.rb', line 31 def ogg ZencoderAttachment.new(self, "audio.ogg") end |
#output_definition ⇒ Object
35 36 37 |
# File 'app/models/pageflow/audio_file.rb', line 35 def output_definition ZencoderAudioOutputDefinition.new(self) end |