Class: Resend::Client

Inherits:
Object
  • Object
show all
Includes:
Emails
Defined in:
lib/resend/client.rb

Overview

Client class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Emails

cancel, get, send, #send_email, update

Constructor Details

#initialize(api_key) ⇒ Client

Returns a new instance of Client.

Raises:

  • (ArgumentError)


18
19
20
21
22
# File 'lib/resend/client.rb', line 18

def initialize(api_key)
  raise ArgumentError, "API Key is not a string" unless api_key.is_a?(String)

  @api_key = api_key
end

Instance Attribute Details

#api_keyObject (readonly)

Returns the value of attribute api_key.



16
17
18
# File 'lib/resend/client.rb', line 16

def api_key
  @api_key
end