Class: ConferenceCallService::ConferenceDetails
- Inherits:
-
Object
- Object
- ConferenceCallService::ConferenceDetails
- Defined in:
- lib/conference_call_service/conference_details.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
-
.build_from_xml(xml_doc) ⇒ Object
Static methods.
Instance Method Summary collapse
- #add_to_handsoap_xml(xml_doc) ⇒ Object
-
#initialize(name, description, duration) ⇒ ConferenceDetails
constructor
Constructor.
- #to_s ⇒ Object
Constructor Details
#initialize(name, description, duration) ⇒ ConferenceDetails
Constructor
8 9 10 11 12 |
# File 'lib/conference_call_service/conference_details.rb', line 8 def initialize(name, description, duration) @name = name @description = description @duration = duration end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/conference_call_service/conference_details.rb', line 5 def description @description end |
#duration ⇒ Object
Returns the value of attribute duration.
5 6 7 |
# File 'lib/conference_call_service/conference_details.rb', line 5 def duration @duration end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/conference_call_service/conference_details.rb', line 5 def name @name end |
Class Method Details
.build_from_xml(xml_doc) ⇒ Object
Static methods
26 27 28 29 30 31 32 33 34 |
# File 'lib/conference_call_service/conference_details.rb', line 26 def self.build_from_xml(xml_doc) if xml_doc then name = ConferenceCallService.xpath_query(xml_doc, "name").to_s description = ConferenceCallService.xpath_query(xml_doc, "description").to_s duration = ConferenceCallService.xpath_query(xml_doc, "duration").to_s new(name, description, duration) end end |
Instance Method Details
#add_to_handsoap_xml(xml_doc) ⇒ Object
18 19 20 21 22 |
# File 'lib/conference_call_service/conference_details.rb', line 18 def add_to_handsoap_xml(xml_doc) xml_doc.add('name', @name.to_s) xml_doc.add('description', @description.to_s) xml_doc.add('duration', @duration.to_s) end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/conference_call_service/conference_details.rb', line 14 def to_s "#{@name.to_s} - #{@description.to_s}: #{@duration.to_s}" end |