Class: JIRA::Comment
- Inherits:
-
Object
- Object
- JIRA::Comment
- Defined in:
- lib/jiraSOAP/remoteEntities.rb
Overview
Represents a comment. Straight forward.
Instance Attribute Summary collapse
- #body ⇒ String
- #create_date ⇒ Time
- #group_level ⇒ String
- #id ⇒ String
- #last_updated ⇒ Time
- #original_author ⇒ String
- #role_level ⇒ String
- #update_author ⇒ String
Class Method Summary collapse
-
.comment_with_xml_fragment(frag) ⇒ JIRA::Comment?
Factory method that takes a fragment of a SOAP response.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ String
156 157 158 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 156 def body @body end |
#create_date ⇒ Time
158 159 160 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 158 def create_date @create_date end |
#group_level ⇒ String
154 155 156 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 154 def group_level @group_level end |
#id ⇒ String
148 149 150 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 148 def id @id end |
#last_updated ⇒ Time
160 161 162 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 160 def last_updated @last_updated end |
#original_author ⇒ String
150 151 152 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 150 def @original_author end |
#role_level ⇒ String
152 153 154 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 152 def role_level @role_level end |
#update_author ⇒ String
162 163 164 |
# File 'lib/jiraSOAP/remoteEntities.rb', line 162 def @update_author end |
Class Method Details
.comment_with_xml_fragment(frag) ⇒ JIRA::Comment?
Factory method that takes a fragment of a SOAP response.
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. = 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. = 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
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 |