Module: Cloudflared
- Defined in:
- lib/cloudflared.rb,
lib/cloudflared/error.rb,
lib/cloudflared/client.rb,
lib/cloudflared/config.rb,
lib/cloudflared/object.rb,
lib/cloudflared/version.rb,
lib/cloudflared/resource.rb,
lib/cloudflared/collection.rb,
lib/cloudflared/objects/image.rb,
lib/cloudflared/resources/images.rb
Defined Under Namespace
Classes: Client, Collection, Config, Error, Image, ImagesResource, Object, Resource
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.client ⇒ Object
Creates a client instance with pre-configured values.
-
.config ⇒ Object
Returns Cloudflared's configuration object.
-
.configure {|config| ... } ⇒ Object
Lets you set global configuration options.
Class Method Details
.client ⇒ Object
Creates a client instance with pre-configured values
22 23 24 25 26 27 28 29 30 |
# File 'lib/cloudflared.rb', line 22 def self.client Cloudflared::Client.new( api_key: config.api_key, account_id: config.account_id, images_hash: config.images_hash, images_default_key: config.images_default_key, adapter: config.adapter || Faraday.default_adapter ) end |
.config ⇒ Object
Returns Cloudflared's configuration object.
17 18 19 |
# File 'lib/cloudflared.rb', line 17 def self.config @config ||= Cloudflared::Config.new end |
.configure {|config| ... } ⇒ Object
Lets you set global configuration options.
All available options and their defaults are in the example below:
43 44 45 |
# File 'lib/cloudflared.rb', line 43 def self.configure(&block) yield(config) if block end |