Class: CustomFieldValue
- Inherits:
-
Object
- Object
- CustomFieldValue
- Defined in:
- lib/json/custom_field_value.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #hash_code ⇒ Object
-
#initialize(name, value, type) ⇒ CustomFieldValue
constructor
A new instance of CustomFieldValue.
- #to_s ⇒ Object
Constructor Details
#initialize(name, value, type) ⇒ CustomFieldValue
Returns a new instance of CustomFieldValue.
6 7 8 9 10 |
# File 'lib/json/custom_field_value.rb', line 6 def initialize(name, value, type) @name = name @type = type @value = value end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/json/custom_field_value.rb', line 4 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/json/custom_field_value.rb', line 4 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/json/custom_field_value.rb', line 4 def value @value end |
Instance Method Details
#==(o) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/json/custom_field_value.rb', line 12 def ==(o) return true if self.object_id == o.object_id return false if o.nil? || self.class != o.class that = o @name == that.name && @type == that.type && @value == that.value end |
#hash_code ⇒ Object
20 21 22 |
# File 'lib/json/custom_field_value.rb', line 20 def hash_code { name: @name, type: @type, value: @value } end |
#to_s ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/json/custom_field_value.rb', line 24 def to_s "CustomFieldValue{" + "name='#{@name}'" + ", type='#{@type}'" + ", value='#{@value}'" + "}" end |