Class: Fog::Associations::OracleDefault

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

Instance Method Summary collapse

Instance Method Details

#create_getterObject



12
13
14
15
16
17
18
# File 'lib/fog/oracle/models/associations.rb', line 12

def create_getter
  model.class_eval <<-EOS, __FILE__, __LINE__
    def #{name}
      associations[:#{name}]
    end
  EOS
end

#create_setterObject



4
5
6
7
8
9
10
# File 'lib/fog/oracle/models/associations.rb', line 4

def create_setter
  model.class_eval <<-EOS, __FILE__, __LINE__
    def #{name}=(new_#{name})
      associations[:#{name}] = new_#{name}
    end
  EOS
end