lib/active_fedora/orders/reflection.rb in activefedora-aggregation-0.9.0 vs lib/active_fedora/orders/reflection.rb in activefedora-aggregation-0.10.0
- old
+ new
@@ -1,7 +1,22 @@
module ActiveFedora::Orders
class Reflection < ActiveFedora::Reflection::AssociationReflection
+ class << self
+ def create(macro, name, scope, options, active_fedora)
+ klass = case macro
+ when :aggregation
+ Reflection
+ when :filter
+ ActiveFedora::Filter::Reflection
+ when :orders
+ ActiveFedora::Orders::Reflection
+ end
+ reflection = klass.new(macro, name, scope, options, active_fedora)
+ ActiveFedora::Reflection.add_reflection(active_fedora, name, reflection)
+ reflection
+ end
+ end
def association_class
Association
end
def collection?
@@ -10,11 +25,11 @@
def class_name
klass.to_s
end
- def ordered_reflection
- options[:ordered_reflection]
+ def unordered_reflection
+ options[:unordered_reflection]
end
def klass
ActiveFedora::Orders::ListNode
end