Class: ConstantContact::Components::CustomField
- Defined in:
- lib/constantcontact/components/contacts/custom_field.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
-
.create(props) ⇒ CustomField
Factory method to create a CustomField object from a json string.
Methods inherited from Component
#to_hash, to_hash_value, #to_json
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/constantcontact/components/contacts/custom_field.rb', line 10 def name @name end |
#value ⇒ Object
Returns the value of attribute value
10 11 12 |
# File 'lib/constantcontact/components/contacts/custom_field.rb', line 10 def value @value end |
Class Method Details
.create(props) ⇒ CustomField
Factory method to create a CustomField object from a json string
15 16 17 18 19 20 21 22 23 |
# File 'lib/constantcontact/components/contacts/custom_field.rb', line 15 def self.create(props) obj = CustomField.new if props props.each do |key, value| obj.send("#{key}=", value) if obj.respond_to? key end end obj end |