Class: Filemaker::Model::Relations::BelongsTo

Inherits:
Proxy
  • Object
show all
Defined in:
lib/filemaker/model/relations/belongs_to.rb

Instance Attribute Summary

Attributes inherited from Proxy

#options, #owner, #target

Instance Method Summary collapse

Methods inherited from Proxy

#method_missing, #target_class

Constructor Details

#initialize(owner, name, options) ⇒ BelongsTo



7
8
9
10
# File 'lib/filemaker/model/relations/belongs_to.rb', line 7

def initialize(owner, name, options)
  super(owner, name, options)
  build_target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Filemaker::Model::Relations::Proxy

Instance Method Details

#reference_keyObject



12
13
14
# File 'lib/filemaker/model/relations/belongs_to.rb', line 12

def reference_key
  options.fetch(:reference_key) { "#{@name}_id" }
end