Class: JIRA::TimeInfo
- Inherits:
-
Object
- Object
- JIRA::TimeInfo
- Defined in:
- lib/jiraSOAP/remoteEntities.rb
Overview
TODO:
turn attributes back to read-only by not using a factory for init
Simple structure for a time and time zone; used oddly. The only place this structure is used is when #get_server_info is called.
Instance Attribute Summary collapse
Class Method Summary collapse
-
.time_info_with_xml_fragment(frag) ⇒ JIRA::TimeInfo?
Factory method that takes a fragment of a SOAP response.
Instance Attribute Details
#server_time ⇒ Time
705 706 707 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 705 def server_time @server_time end |
#timezone ⇒ String
707 708 709 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 707 def timezone @timezone end |
Class Method Details
.time_info_with_xml_fragment(frag) ⇒ JIRA::TimeInfo?
Factory method that takes a fragment of a SOAP response.
712 713 714 715 716 717 718 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 712 def self.time_info_with_xml_fragment(frag) return if frag.nil? time_info = TimeInfo.new time_info.server_time = Time.parse frag.xpath('serverTime').to_s time_info.timezone = frag.xpath('timeZoneId').to_s time_info end |