Class: DataMapper::Reflection::Builders::Source::ManyToOne

Inherits:
Relationship
  • Object
show all
Defined in:
lib/dm-reflection/builders/source_builder.rb

Instance Attribute Summary

Attributes inherited from Relationship

#backend

Instance Method Summary collapse

Methods inherited from Relationship

for, #irrelevant_options, #max, #min, #name, #option_priorities, #prioritized_options

Methods included from OptionBuilder

#backend_options, #irrelevant_options, #option_priorities, #options, #prioritized_options, #rest_options

Instance Method Details

#cardinalityObject



284
285
286
# File 'lib/dm-reflection/builders/source_builder.rb', line 284

def cardinality
  ''
end

#to_rubyObject



278
279
280
# File 'lib/dm-reflection/builders/source_builder.rb', line 278

def to_ruby
  "#{type} :#{name}#{options}"
end

#typeObject



281
282
283
# File 'lib/dm-reflection/builders/source_builder.rb', line 281

def type
  :belongs_to
end