Class: JIRA::Comment

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

Overview

Represents a comment. Straight forward.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyString

Returns:

  • (String)


156
157
158
# File 'lib/jiraSOAP/remoteEntities.rb', line 156

def body
  @body
end

#create_dateTime

Returns:

  • (Time)


158
159
160
# File 'lib/jiraSOAP/remoteEntities.rb', line 158

def create_date
  @create_date
end

#group_levelString

Returns:

  • (String)


154
155
156
# File 'lib/jiraSOAP/remoteEntities.rb', line 154

def group_level
  @group_level
end

#idString

Returns:

  • (String)


148
149
150
# File 'lib/jiraSOAP/remoteEntities.rb', line 148

def id
  @id
end

#last_updatedTime

Returns:

  • (Time)


160
161
162
# File 'lib/jiraSOAP/remoteEntities.rb', line 160

def last_updated
  @last_updated
end

#original_authorString

Returns:

  • (String)


150
151
152
# File 'lib/jiraSOAP/remoteEntities.rb', line 150

def original_author
  @original_author
end

#role_levelString

Returns:

  • (String)


152
153
154
# File 'lib/jiraSOAP/remoteEntities.rb', line 152

def role_level
  @role_level
end

#update_authorString

Returns:

  • (String)


162
163
164
# File 'lib/jiraSOAP/remoteEntities.rb', line 162

def update_author
  @update_author
end

Class Method Details

.comment_with_xml_fragment(frag) ⇒ JIRA::Comment?

Factory method that takes a fragment of a SOAP response.

Parameters:

  • frag (Handsoap::XmlQueryFront::NokogiriDriver)

Returns:



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/jiraSOAP/remoteEntities.rb', line 167

def self.comment_with_xml_fragment(frag)
  return if frag.nil?
  comment                 = Comment.new
  comment.id              = frag.xpath('id').to_s
  comment.original_author = frag.xpath('author').to_s
  comment.body            = frag.xpath('body').to_s
  comment.group_level     = frag.xpath('updateAuthor').to_s
  comment.role_level      = frag.xpath('roleLevel').to_s
  comment.update_author   = frag.xpath('updateAuthor').to_s
  date = frag.xpath('created').to_s
  comment.create_date     = Time.xmlschema date unless date.nil?
  date = frag.xpath('updated').to_s
  comment.last_updated    = Time.xmlschema date unless date.nil?
  comment
end

Instance Method Details

#soapify_for(msg) ⇒ Handsoap::XmlMason::Node

Parameters:

Returns:



185
186
187
188
189
190
191
192
# File 'lib/jiraSOAP/remoteEntities.rb', line 185

def soapify_for(msg)
  msg.add 'id', @id
  msg.add 'author', @original_author
  msg.add 'body', @body
  msg.add 'groupLevel', @group_level
  msg.add 'roleLevel', @role_level
  msg.add 'updateAuthor', @update_author
end