Skip to content

Instantly share code, notes, and snippets.

@frank184
Created February 15, 2016 19:17
Show Gist options
  • Save frank184/42d8f3e68592cbbd6fc1 to your computer and use it in GitHub Desktop.
Save frank184/42d8f3e68592cbbd6fc1 to your computer and use it in GitHub Desktop.
Ruby on Rails CloudFlare gem easy connection
# Example: CloudFlare::connect { |connection| puts connection }
module CloudFlare
API_KEY = ENV['CLOUDFLARE_API_KEY']
EMAIL = ENV['CLOUDFLARE_EMAIL']
def self.connect
yield Connection.new(API_KEY, EMAIL) if block_given?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment