Class: JIRA::Priority

Inherits:
Object
  • Object
show all
Defined in:
lib/jiraSOAP/remoteEntities.rb

Overview

Represents a priority level. Straightforward.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#colorObject

Returns the value of attribute color.



5
6
7
# File 'lib/jiraSOAP/remoteEntities.rb', line 5

def color
  @color
end

#descriptionObject

Returns the value of attribute description.



5
6
7
# File 'lib/jiraSOAP/remoteEntities.rb', line 5

def description
  @description
end

#iconObject

Returns the value of attribute icon.



5
6
7
# File 'lib/jiraSOAP/remoteEntities.rb', line 5

def icon
  @icon
end

#idObject

Returns the value of attribute id.



5
6
7
# File 'lib/jiraSOAP/remoteEntities.rb', line 5

def id
  @id
end

#nameObject

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.

Parameters:

  • frag (Handsoap::XmlQueryFront::NokogiriDriver)

Returns:



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