Class: JIRA::FieldValue
- Inherits:
-
Object
- Object
- JIRA::FieldValue
- Defined in:
- lib/jiraSOAP/entities/field_value.rb
Overview
A structure that is a bit of a hack; it is just a key-value pair that is used by RemoteAPI#update_issue.
Instance Attribute Summary collapse
-
#field_name ⇒ String
The name for regular fields, and the id for custom fields.
-
#values ⇒ Array(#to_s)
An array for the values, usually a single.
Instance Method Summary collapse
-
#initialize(field_name = nil, values = nil) ⇒ FieldValue
constructor
A new instance of FieldValue.
- #soapify_for(message, label = 'fieldValue') ⇒ Handsoap::XmlMason::Element
Constructor Details
#initialize(field_name = nil, values = nil) ⇒ FieldValue
Returns a new instance of FieldValue.
13 14 15 16 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 13 def initialize(field_name = nil, values = nil) @field_name = field_name @values = values end |
Instance Attribute Details
#field_name ⇒ String
Returns the name for regular fields, and the id for custom fields.
6 7 8 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 6 def field_name @field_name end |
#values ⇒ Array(#to_s)
Returns an array for the values, usually a single.
9 10 11 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 9 def values @values end |
Instance Method Details
#soapify_for(message, label = 'fieldValue') ⇒ Handsoap::XmlMason::Element
TODO:
soapify properly for custom objects (JIRA module).
22 23 24 25 26 27 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 22 def soapify_for(, label = 'fieldValue') .add label do || .add 'id', @field_name .add_simple_array 'values', @values unless @values.nil? end end |