Class: ActiveFedora::Aggregation::Reflection
- Inherits:
-
Reflection::AssociationReflection
- Object
- Reflection::AssociationReflection
- ActiveFedora::Aggregation::Reflection
- Defined in:
- lib/active_fedora/aggregation/reflection.rb
Instance Method Summary collapse
Instance Method Details
#association_class ⇒ Object
3 4 5 |
# File 'lib/active_fedora/aggregation/reflection.rb', line 3 def association_class Association end |
#collection? ⇒ Boolean
24 25 26 |
# File 'lib/active_fedora/aggregation/reflection.rb', line 24 def collection? true end |
#klass ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/active_fedora/aggregation/reflection.rb', line 7 def klass @klass ||= begin klass = class_name.constantize klass.respond_to?(:uri_to_id) ? klass : ActiveFedora::Base rescue NameError => e # If the NameError is a result of the class having a # NameError (e.g. NoMethodError) within it then raise the error. raise e if Object.const_defined? class_name # Otherwise the NameError was a result of not being able to find the class ActiveFedora::Base end end |
#predicate ⇒ Object
20 21 22 |
# File 'lib/active_fedora/aggregation/reflection.rb', line 20 def predicate @options[:predicate] || ::RDF::Vocab::ORE.aggregates end |