class ActiveFedora::Associations::ContainsAssociation

:nodoc:

def count_records

def count_records
  load_target.size
end

def include?(other)

def include?(other)
  if loaded?
    target.include?(other)
  elsif container_predicate = options[:has_member_relation]
    owner.resource.query(predicate: container_predicate, object: ::RDF::URI(other.uri)).present?
  else # is_member_of_relation
    # This will force a load, so it's slowest and the least preferable option
    target.include?(other)
  end
end

def reader

:nodoc:
def reader
  @records ||= ContainerProxy.new(self)
end

def uri

def uri
  raise "Can't get uri. Owner isn't saved" if @owner.new_record?
  "#{@owner.uri}/#{@reflection.name}"
end