You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: factory.rb
    path of file: ./repos/sequencescape/app/api/core/endpoint/basic_handler/actions
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module Core::Endpoint::BasicHandler::Actions::Factory
  class Nested < Core::Endpoint::BasicHandler
    def initialize(name, &block)
      super(&block)
      @name = name.to_s
    end

    def separate(associations, _)
      associations[@name] =
        lambda do |object, options, stream|
          strea
    
    def separate(associations, _)
      associations[@name] =
        lambda do |object, options, stream|
          stream.block(@name) do |nested_stream|
            nested_stream.block('actions') do |action_stream|
              actions(object, options.merge(target: object)).map { |action, url| action_stream.attribute(action, url) }
            end
          end
        end
    end