module ActiveFedora::Core
def initialize(attributes = nil, &_block)
+:namespace+ value to Fedora::Repository.nextid to generate the next id available within
Also, if +attrs+ does not contain +:id+ but does contain +:namespace+ it will pass the
next available Fedora id, and mark as new object.
Constructor. You may supply a custom +:id+, or we call the Fedora Rest API for the
def initialize(attributes = nil, &_block) init_internals attributes = attributes.dup if attributes # can't dup nil in Ruby 2.3 id = attributes && (attributes.delete(:id) || attributes.delete('id')) @ldp_source = build_ldp_resource(id) raise IllegalOperation, "Attempting to recreate existing ldp_source: `#{ldp_source.subject}'" unless ldp_source.new? assign_attributes(attributes) if attributes assert_content_model load_attached_files yield self if block_given? _run_initialize_callbacks end