Class: JIRA::Priority
- Inherits:
-
Object
- Object
- JIRA::Priority
- Defined in:
- lib/jiraSOAP/remoteEntities.rb
Overview
Represents a priority level. Straightforward.
Instance Attribute Summary collapse
-
#color ⇒ String
Is a hex value.
- #description ⇒ String
-
#icon ⇒ URL
A NSURL on MacRuby and a URI::HTTP object in CRuby.
- #id ⇒ String
- #name ⇒ String
Class Method Summary collapse
-
.priority_with_xml_fragment(frag) ⇒ JIRA::Priority?
Factory method that takes a fragment of a SOAP response.
Instance Attribute Details
#color ⇒ String
Returns is a hex value.
10 11 12 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 10 def color @color end |
#description ⇒ String
14 15 16 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 14 def description @description end |
#icon ⇒ URL
Returns A NSURL on MacRuby and a URI::HTTP object in CRuby.
12 13 14 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 12 def icon @icon end |
#id ⇒ String
6 7 8 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 6 def id @id end |
#name ⇒ String
8 9 10 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 8 def name @name end |
Class Method Details
.priority_with_xml_fragment(frag) ⇒ JIRA::Priority?
TODO:
change @color to be some kind of hex Fixnum object
Factory method that takes a fragment of a SOAP response.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 20 def self.priority_with_xml_fragment(frag) return if frag.nil? priority = Priority.new priority.id = frag.xpath('id').to_s priority.name = frag.xpath('name').to_s priority.color = frag.xpath('color').to_s priority.description = frag.xpath('description').to_s url = frag.xpath('icon').to_s priority.icon = URL.new url unless url.nil? priority end |