lib/active_fedora/base.rb in active-fedora-6.1.1 vs lib/active_fedora/base.rb in active-fedora-6.2.0
- old
+ new
@@ -28,10 +28,12 @@
class_attribute :fedora_connection, :profile_solr_name
self.fedora_connection = {}
self.profile_solr_name = ActiveFedora::SolrService.solr_name("object_profile", :displayable)
+ delegate :label, :label=, to: :inner_object
+ delegate :state=, :state, to: :inner_object
def method_missing(name, *args)
dsid = corresponding_datastream_name(name)
if dsid
### Create and invoke a proxy method
@@ -214,15 +216,10 @@
#return the internal fedora URI
def internal_uri
"info:fedora/#{pid}"
end
- #return the state of the inner object
- def state
- @inner_object.state
- end
-
#return the owner id
def owner_id
@inner_object.ownerId
end
@@ -236,18 +233,9 @@
end
#return the modification date of the inner object (unless it's a new object)
def modified_date
@inner_object.new? ? Time.now : @inner_object.profile["objLastModDate"]
- end
-
- #return the label of the inner object (unless it's a new object)
- def label
- @inner_object.label
- end
-
- def label=(new_label)
- @inner_object.label = new_label
end
def ==(comparison_object)
comparison_object.equal?(self) ||
(comparison_object.instance_of?(self.class) &&