class Arv::Collection::CollectionRoot
Public Class Methods
new()
click to toggle source
Calls superclass method
Arv::Collection::CollectionStream::new
# File lib/arvados/collection.rb, line 439 def initialize super("") setup end
Public Instance Methods
check_can_merge(src_item, key)
click to toggle source
Calls superclass method
Arv::Collection::CollectionStream#check_can_merge
# File lib/arvados/collection.rb, line 450 def check_can_merge(src_item, key) if items.include?(key) super else raise_root_write_error(key) end end
delete(name, opts={})
click to toggle source
Calls superclass method
Arv::Collection::CollectionStream#delete
# File lib/arvados/collection.rb, line 444 def delete(name, opts={}) super # If that didn't fail, it deleted the . stream. Recreate it. setup end
Private Instance Methods
[]=(key, item)
click to toggle source
# File lib/arvados/collection.rb, line 472 def []=(key, item) raise_root_write_error(key) end
add_copy(src_item, key)
click to toggle source
# File lib/arvados/collection.rb, line 464 def add_copy(src_item, key) items["."].add_copy(src_item, key) end
raise_root_write_error(key)
click to toggle source
# File lib/arvados/collection.rb, line 468 def raise_root_write_error(key) raise ArgumentError.new("can't write to %p at collection root" % key) end
setup()
click to toggle source
# File lib/arvados/collection.rb, line 460 def setup items["."] = CollectionStream.new(".") end