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_from_string(*args) ⇒ Object deprecated Deprecated.
- .from_class_uri(model_value) ⇒ Class, False deprecated Deprecated.
Class Method Details
.class_from_string(*args) ⇒ Object
Deprecated.
Convenience method for getting class constant based on a string
16 17 18 19 |
# File 'lib/active_fedora/model.rb', line 16 def self.class_from_string(*args) Deprecation.warn("ActiveFedora::Model.class_from_string has been deprecated and will be removed in ActiveFedora 10.0. Use ActiveFedora::ModelClassifier.class_from_string instead") ActiveFedora::ModelClassifier.class_from_string(*args) end |
.from_class_uri(model_value) ⇒ Class, False
Deprecated.
Takes a Fedora URI for a cModel, and returns a corresponding Model if available This method should reverse ClassMethods#to_class_uri
26 27 28 29 |
# File 'lib/active_fedora/model.rb', line 26 def self.from_class_uri(model_value) Deprecation.warn("ActiveFedora::Model.from_class_uri has been deprecated and will be removed in ActiveFedora 10.0. Use ActiveFedora::ModelClassifier.from_class_uri instead") ActiveFedora::ModelClassifier.new(Array(model_value)).best_model end |