Module: Twilio::Rails::Models::Recording
- Extended by:
- ActiveSupport::Concern
- Included in:
- Recording
- Defined in:
- lib/twilio/rails/models/recording.rb
Overview
A recording of a fragment of a phone call gathered from Twilio. See ‘gather: { type: :voice }` in the documentation for Phone::BaseTree. Is associated to one Response. Attaches the audio file as an ActiveStorage attachment.
Instance Method Summary collapse
-
#length_seconds ⇒ Integer?
The length of the recording in seconds, or nil if unavailable.
Instance Method Details
#length_seconds ⇒ Integer?
Returns The length of the recording in seconds, or nil if unavailable.
21 22 23 |
# File 'lib/twilio/rails/models/recording.rb', line 21 def length_seconds duration.to_i if duration.present? end |