Class: Fog::Associations::OracleOneModel

Inherits:
OracleDefault 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



22
23
24
25
26
27
28
29
# File 'lib/fog/oracle/models/associations.rb', line 22

def create_setter
  model.class_eval <<-EOS, __FILE__, __LINE__
    def #{name}=(new_#{name})
      return if new_#{name}.nil?
      associations[:#{name}] = service.send(self.class.associations[:#{name}]).new(new_#{name})
    end
  EOS
end