Method: Brine::CleaningUp::DeleteCommand#initialize

Defined in:
lib/brine/cleaning_up.rb

#initialize(client, path, oks: [200,204], attempts: 3) ⇒ DeleteCommand

Construct a command with the required paramters to perform the delete.

Parameters:

  • client (Faraday::Connection, #delete)

    Provide the Faraday client which will send the delete message.

  • path (String)

    Specify the path of the resource to be deleted.

  • oks (Array<Integer>) (defaults to: [200,204])

    Indicate response status codes which should be considered successful) (defaults to [200,204]).

  • attempts (Integer) (defaults to: 3)

    Specify the number of times this command should be tried (defaults to 3).



41
42
43
44
45
46
# File 'lib/brine/cleaning_up.rb', line 41

def initialize(client, path, oks: [200,204], attempts: 3)
  @client = client
  @path = path
  @oks = oks
  @attempts = attempts
end