Class: MoveToGo::CustomFieldReference
- Inherits:
-
Object
- Object
- MoveToGo::CustomFieldReference
- Includes:
- ModelWithIntegrationIdSameAs, SerializeHelper
- Defined in:
- lib/move-to-go/model/customfield.rb
Instance Attribute Summary collapse
-
#integration_id ⇒ Object
Returns the value of attribute integration_id.
Instance Method Summary collapse
- #get_import_rows ⇒ Object
-
#initialize(opt = nil) ⇒ CustomFieldReference
constructor
A new instance of CustomFieldReference.
- #serialize_name ⇒ Object
- #serialize_variables ⇒ Object
Methods included from SerializeHelper
#serialize, #serialize_to_file
Methods included from ModelWithIntegrationIdSameAs
Constructor Details
#initialize(opt = nil) ⇒ CustomFieldReference
Returns a new instance of CustomFieldReference.
7 8 9 10 11 12 13 14 |
# File 'lib/move-to-go/model/customfield.rb', line 7 def initialize(opt=nil) if opt != nil serialize_variables.each do |myattr| val = opt[myattr[:id]] instance_variable_set("@" + myattr[:id].to_s, val) if val != nil end end end |
Instance Attribute Details
#integration_id ⇒ Object
Returns the value of attribute integration_id.
5 6 7 |
# File 'lib/move-to-go/model/customfield.rb', line 5 def integration_id @integration_id end |
Instance Method Details
#get_import_rows ⇒ Object
20 21 22 23 24 |
# File 'lib/move-to-go/model/customfield.rb', line 20 def get_import_rows serialize_variables.map do |p| map_to_row p end end |
#serialize_name ⇒ Object
26 27 28 |
# File 'lib/move-to-go/model/customfield.rb', line 26 def serialize_name "CustomFieldReference" end |
#serialize_variables ⇒ Object
16 17 18 |
# File 'lib/move-to-go/model/customfield.rb', line 16 def serialize_variables [:integration_id].map {|p| { :id => p, :type => :string } } end |