Class: DataMapper::Reflection::Builders::Source::OneToMany
- Inherits:
-
Relationship
- Object
- Relationship
- DataMapper::Reflection::Builders::Source::OneToMany
- Defined in:
- lib/dm-reflection/builders/source_builder.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Relationship
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
#cardinality ⇒ Object
302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/dm-reflection/builders/source_builder.rb', line 302 def cardinality max_string = max == Infinity ? 'n' : max.to_s if min == 0 || min == max max_string elsif max == Infinity "#{min}..#{max_string}" else super end end |
#type ⇒ Object
299 300 301 |
# File 'lib/dm-reflection/builders/source_builder.rb', line 299 def type :has end |