Class: Voice

Inherits:
Common2 show all
Defined in:
lib/objects/voice.rb

Overview

Monday, August 24 2020 EAT

This object represents a voice note.

Extends Common2 class.

Instance Method Summary collapse

Methods inherited from Common2

#file_id, #file_size, #file_unique_id, #mime_type

Constructor Details

#initialize(obj) ⇒ Voice

:nodoc:



12
13
14
# File 'lib/objects/voice.rb', line 12

def initialize(obj) # :nodoc:
  super(obj)
end

Instance Method Details

#durationObject

Duration of the audio in seconds as defined by sender.



17
18
19
# File 'lib/objects/voice.rb', line 17

def duration
  @obj.duration
end