Class: ConferenceCallService::Participant
- Inherits:
-
Object
- Object
- ConferenceCallService::Participant
- Defined in:
- lib/conference_call_service/participant.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
-
#id ⇒ Object
Returns the value of attribute id.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
-
.build_from_xml(xml_doc) ⇒ Object
Static methods.
Instance Method Summary collapse
-
#initialize(id, details, status) ⇒ Participant
constructor
Constructor.
- #to_s ⇒ Object
Constructor Details
#initialize(id, details, status) ⇒ Participant
Constructor
6 7 8 9 10 |
# File 'lib/conference_call_service/participant.rb', line 6 def initialize(id, details, status) @id = id @details = details @status = status end |
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
3 4 5 |
# File 'lib/conference_call_service/participant.rb', line 3 def details @details end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/conference_call_service/participant.rb', line 3 def id @id end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/conference_call_service/participant.rb', line 3 def status @status end |
Class Method Details
.build_from_xml(xml_doc) ⇒ Object
Static methods
18 19 20 21 22 23 24 25 26 |
# File 'lib/conference_call_service/participant.rb', line 18 def self.build_from_xml(xml_doc) if xml_doc then id = ConferenceCallService.xpath_query(xml_doc, "participantId").to_s details = ParticipantDetails.build_from_xml( ConferenceCallService.xpath_query(xml_doc, "detail") ) status = { :muted => ConferenceCallService.xpath_query(xml_doc, "status/value").to_s } new(id, details, status) end end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/conference_call_service/participant.rb', line 12 def to_s "Participant - id:#{@id.to_s} details:#{@details.to_s}, status:#{@status.to_s}" end |