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

get, send, #send_email

Constructor Details

#initialize(api_key) ⇒ Client

Returns a new instance of Client.

Raises:

  • (ArgumentError)


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

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.



13
14
15
# File 'lib/resend/client.rb', line 13

def api_key
  @api_key
end