Class: ActiveFedora::Associations::Builder::BelongsTo
- Inherits:
-
SingularAssociation
- Object
- Association
- SingularAssociation
- ActiveFedora::Associations::Builder::BelongsTo
- Defined in:
- lib/active_fedora/associations/builder/belongs_to.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Association
#mixin, #model, #name, #options
Instance Method Summary collapse
Methods inherited from SingularAssociation
constructable?, define_accessors, define_constructors
Methods inherited from Association
build, #build, #configure_dependency, define_accessors, define_callbacks, define_readers, define_writers, #initialize, #predicate, #translate_property_to_predicate
Constructor Details
This class inherits a constructor from ActiveFedora::Associations::Builder::Association
Instance Method Details
#validate_options ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/active_fedora/associations/builder/belongs_to.rb', line 5 def super if ![:predicate] raise "You must specify a predicate for #{name}" elsif ![:predicate].kind_of?(RDF::URI) raise ArgumentError, "Predicate must be a kind of RDF::URI" end end |