Class: CloudflareStorage::Values
- Defined in:
- lib/cloudflare_storage/values.rb
Instance Method Summary collapse
- #delete(key) ⇒ Object
-
#initialize(client) ⇒ Values
constructor
A new instance of Values.
- #read(key) ⇒ Object
-
#write(key, value) ⇒ Object
Manage Values.
Methods inherited from Client
Constructor Details
#initialize(client) ⇒ Values
Returns a new instance of Values.
4 5 6 |
# File 'lib/cloudflare_storage/values.rb', line 4 def initialize(client) @client ||= client end |
Instance Method Details
#delete(key) ⇒ Object
17 18 19 |
# File 'lib/cloudflare_storage/values.rb', line 17 def delete(key) @client.conn_delete("values/#{key}") end |
#read(key) ⇒ Object
13 14 15 |
# File 'lib/cloudflare_storage/values.rb', line 13 def read(key) @client.get("values/#{key}") end |
#write(key, value) ⇒ Object
Manage Values
9 10 11 |
# File 'lib/cloudflare_storage/values.rb', line 9 def write(key, value) @client.put("values/#{key}", value) end |