Class: CloudflareStorage::Keys

Inherits:
Client
  • Object
show all
Defined in:
lib/cloudflare_storage/keys.rb

Instance Method Summary collapse

Methods inherited from Client

#keys, #values

Constructor Details

#initialize(client) ⇒ Keys

Returns a new instance of Keys.



4
5
6
# File 'lib/cloudflare_storage/keys.rb', line 4

def initialize(client)
  @client ||= client
end

Instance Method Details

#list(prefix) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/cloudflare_storage/keys.rb', line 8

def list(prefix)
  if prefix && !prefix.empty?
    @client.get("keys", { "prefix": prefix })
  else
    @client.get("keys")
  end
end