Module: ActiveFedora::LdpResourceAddons
- Extended by:
- ActiveSupport::Concern
- Included in:
- DirectContainerResource, IndirectContainerResource, LdpResource
- Defined in:
- lib/active_fedora/ldp_resource.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #build_empty_graph ⇒ Object
- #graph_class ⇒ Object
-
#marshal_dump ⇒ Object
Don’t dump @client, it has a proc and thus can’t be serialized.
- #marshal_load(data) ⇒ Object
Instance Method Details
#build_empty_graph ⇒ Object
10 11 12 |
# File 'lib/active_fedora/ldp_resource.rb', line 10 def build_empty_graph graph_class.new(subject_uri) end |
#graph_class ⇒ Object
14 15 16 |
# File 'lib/active_fedora/ldp_resource.rb', line 14 def graph_class self.class.graph_class end |
#marshal_dump ⇒ Object
Don’t dump @client, it has a proc and thus can’t be serialized.
19 20 21 |
# File 'lib/active_fedora/ldp_resource.rb', line 19 def marshal_dump (instance_variables - [:@client]).map { |name| [name, instance_variable_get(name)] } end |
#marshal_load(data) ⇒ Object
23 24 25 |
# File 'lib/active_fedora/ldp_resource.rb', line 23 def marshal_load(data) data.each { |name, val| instance_variable_set(name, val) } end |