Class: CloudflareStorage::Keys
- Defined in:
- lib/cloudflare_storage/keys.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ Keys
constructor
A new instance of Keys.
- #list(prefix) ⇒ Object
Methods inherited from Client
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 |