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: snapshot_droplet.rb
    path of file: ./repos/tugboat/lib/tugboat/middleware
    
    the code of the file until where you have to start completion: module Tugboat
  module Middleware
    class SnapshotDroplet < Base
      def call(env)
        ocean = env['barge']
        # Right now, the digital ocean API doesn't return an error
        # when your droplet is not powered off and you try to snapshot.
        # This is a temporary measure to let the user know.
        say 'Warning: Droplet must be in a powered off state for snapshot to be successful', :yellow

        say "Queuing snapshot '#{env['user_snapshot_name']}' for #{env['droplet_id']} #{env['droplet_name']}...", nil, false

        response = ocean.droplet.snapshot env['droplet_id'],
      
    
      def call(env)
        ocean = env['barge']
        # Right now, the digital ocean API doesn't return an error
        # when your droplet is not powered off and you try to snapshot.
        # This is a temporary measure to let the user know.
        say 'Warning: Droplet must be in a powered off state for snapshot to be successful', :yellow

        say "Queuing snapshot '#{env['user_snapshot_name']}' for #{env['droplet_id']} #{env['droplet_name']}...", nil, false

        response = ocean.droplet.snapshot env['droplet_id'],
                                          name: env['user_snapshot_name']

        if response.success?
          say 'Snapshot successful!', :green
        else
          say "Failed to snapshot Droplet: #{response.message}", :red
          exit 1
        end

        @app.call(env)
      end