Class: JIRA::Status

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

Overview

Represents a status. Straightforward.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#descriptionString

Returns:

  • (String)


204
205
206
# File 'lib/jiraSOAP/remoteEntities.rb', line 204

def description
  @description
end

#iconURL

Returns:



202
203
204
# File 'lib/jiraSOAP/remoteEntities.rb', line 202

def icon
  @icon
end

#idString

Returns:

  • (String)


198
199
200
# File 'lib/jiraSOAP/remoteEntities.rb', line 198

def id
  @id
end

#nameString

Returns:

  • (String)


200
201
202
# File 'lib/jiraSOAP/remoteEntities.rb', line 200

def name
  @name
end

Class Method Details

.status_with_xml_fragment(frag) ⇒ JIRA::Status?

Factory method that takes a fragment of a SOAP response.

Parameters:

  • frag (Handsoap::XmlQueryFront::NokogiriDriver)

Returns:



209
210
211
212
213
214
215
216
217
218
# File 'lib/jiraSOAP/remoteEntities.rb', line 209

def self.status_with_xml_fragment(frag)
  return if frag.nil?
  status             = Status.new
  status.id          = frag.xpath('id').to_s
  status.name        = frag.xpath('name').to_s
  status.description = frag.xpath('description').to_s
  url                = frag.xpath('icon').to_s
  status.icon        = URL.new url unless url.nil?
  status
end