Module: Cloudflare::D1

Defined in:
lib/cloudflare/d1.rb,
lib/cloudflare/d1/model.rb,
lib/cloudflare/d1/client.rb,
lib/cloudflare/d1/railtie.rb,
lib/cloudflare/d1/version.rb

Defined Under Namespace

Classes: Client, Error, Model, Railtie

Constant Summary collapse

VERSION =
"0.1.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.account_idObject

Returns the value of attribute account_id.



12
13
14
# File 'lib/cloudflare/d1.rb', line 12

def 
  @account_id
end

.api_tokenObject

Returns the value of attribute api_token.



12
13
14
# File 'lib/cloudflare/d1.rb', line 12

def api_token
  @api_token
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Configure global D1 settings

Example:

Cloudflare::D1.configure do |config|
config. = ENV['CLOUDFLARE_ACCOUNT_ID']
config.api_token = ENV['CLOUDFLARE_API_TOKEN']
end

Yields:

  • (_self)

Yield Parameters:



21
22
23
# File 'lib/cloudflare/d1.rb', line 21

def configure
  yield self
end