Class: DataMapper::Reflection::Builders::Source::OneToOne

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, #to_ruby

Methods included from OptionBuilder

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

Instance Method Details

#cardinalityObject



293
294
295
# File 'lib/dm-reflection/builders/source_builder.rb', line 293

def cardinality
  min == 1 && max == 1 ? '1' : super
end

#typeObject



290
291
292
# File 'lib/dm-reflection/builders/source_builder.rb', line 290

def type
  :has
end