Class: Fog::Associations::OracleManyModels

Inherits:
OracleDefault
  • Object
show all
Defined in:
lib/fog/oracle/models/associations.rb

Instance Method Summary collapse

Methods inherited from OracleDefault

#create_getter

Instance Method Details

#create_setterObject



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/fog/oracle/models/associations.rb', line 33

def create_setter
  model.class_eval "    def \#{name}=(new_\#{name})\n      return if new_\#{name}.nil?\n      collection = service.send(self.class.associations[:\#{name}])\n      associations[:\#{name}] = Array(new_\#{name}).map do |association|\n        collection.new(association)\n      end\n    end\n  EOS\nend\n", __FILE__, __LINE__