Class: VoiceML::Participant
- Inherits:
-
Object
- Object
- VoiceML::Participant
- Defined in:
- lib/voiceml/models/conferences.rb
Overview
A participant in a live conference.
Constant Summary collapse
- ATTRIBUTES =
%w[ call_sid conference_sid account_sid muted hold coaching call_sid_to_coach queue_time start_conference_on_enter end_conference_on_exit status label api_version uri date_created date_updated ].freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Participant
constructor
A new instance of Participant.
Constructor Details
#initialize(attrs = {}) ⇒ Participant
Returns a new instance of Participant.
56 57 58 59 60 61 |
# File 'lib/voiceml/models/conferences.rb', line 56 def initialize(attrs = {}) ATTRIBUTES.each do |field| value = attrs.key?(field) ? attrs[field] : attrs[field.to_sym] instance_variable_set("@#{field}", value) end end |
Class Method Details
.from_hash(hash) ⇒ Object
63 64 65 66 67 |
# File 'lib/voiceml/models/conferences.rb', line 63 def self.from_hash(hash) return nil if hash.nil? new(hash) end |