Class: VoiceML::Conference
- Inherits:
-
Object
- Object
- VoiceML::Conference
- Defined in:
- lib/voiceml/models/conferences.rb
Overview
A Twilio-compatible Conference resource.
Constant Summary collapse
- ATTRIBUTES =
%w[ sid account_sid friendly_name status region api_version uri date_created date_updated reason_conference_ended call_sid_ending_conference subresource_uris member_count ].freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Conference
constructor
A new instance of Conference.
Constructor Details
#initialize(attrs = {}) ⇒ Conference
Returns a new instance of Conference.
16 17 18 19 20 21 |
# File 'lib/voiceml/models/conferences.rb', line 16 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
23 24 25 26 27 |
# File 'lib/voiceml/models/conferences.rb', line 23 def self.from_hash(hash) return nil if hash.nil? new(hash) end |