Module: ActiveFedora::Model

Defined in:
lib/active_fedora/model.rb

Overview

ActiveFedora

This module mixes various methods into the including class, much in the way ActiveRecord does.

Class Method Summary collapse

Class Method Details

.from_class_uri(model_value) ⇒ Class, False

Takes a Fedora URI for a cModel, and returns a corresponding Model if available This method should reverse ClassMethods#to_class_uri



13
14
15
16
17
18
19
20
# File 'lib/active_fedora/model.rb', line 13

def self.from_class_uri(model_value)

  unless class_exists?(model_value)
    ActiveFedora::Base.logger.warn "'#{model_value}' is not a real class" if ActiveFedora::Base.logger
    return nil
  end
  ActiveFedora.class_from_string(model_value)
end