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 ⇒ Object
Returns the value of attribute color.
-
#description ⇒ Object
Returns the value of attribute description.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
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 ⇒ Object
Returns the value of attribute color.
5 6 7 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 5 def color @color end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 5 def description @description end |
#icon ⇒ Object
Returns the value of attribute icon.
5 6 7 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 5 def icon @icon end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 5 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 5 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.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 11 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.icon = URL.new frag.xpath('icon').to_s priority.description = frag.xpath('description').to_s priority end |