Class: JIRA::FieldValue
- Inherits:
-
Object
- Object
- JIRA::FieldValue
- Defined in:
- lib/jiraSOAP/entities/field_value.rb
Overview
This class is a bit of a hack; it is really just a key-value pair and only used with 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 only has one object.
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.
20 21 22 23 24 25 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 20 def initialize field_name = nil, values = nil @field_name = field_name if values @values = values.is_a?( ::Array ) ? values : [values] end end |
Instance Attribute Details
#field_name ⇒ String
The name for regular fields, and the id for custom fields
10 11 12 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 10 def field_name @field_name end |
#values ⇒ Array<#to_s>
An array for the values, usually only has one object
16 17 18 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 16 def values @values end |
Instance Method Details
#soapify_for(message, label = 'fieldValue') ⇒ Handsoap::XmlMason::Element
TODO:
soapify properly for custom objects (JIRA module).
33 34 35 36 37 38 |
# File 'lib/jiraSOAP/entities/field_value.rb', line 33 def soapify_for , label = 'fieldValue' .add label do || .add 'id', @field_name .add_simple_array 'values', @values unless @values.nil? end end |