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

#colorString

Returns is a hex value.

Returns:

  • (String)

    is a hex value



10
11
12
# File 'lib/jiraSOAP/remoteEntities.rb', line 10

def color
  @color
end

#descriptionString

Returns:

  • (String)


14
15
16
# File 'lib/jiraSOAP/remoteEntities.rb', line 14

def description
  @description
end

#iconURL

Returns A NSURL on MacRuby and a URI::HTTP object in CRuby.

Returns:

  • (URL)

    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

#idString

Returns:

  • (String)


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

def id
  @id
end

#nameString

Returns:

  • (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.

Parameters:

  • frag (Handsoap::XmlQueryFront::NokogiriDriver)

Returns:



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