Class: Cloudflare::KV::Namespaces

Inherits:
Representation
  • Object
show all
Includes:
Paginate
Defined in:
lib/cloudflare/kv/namespaces.rb

Instance Method Summary collapse

Methods included from Paginate

#each, #empty?, #find_by_id

Methods inherited from Representation

#process_response, #represent, #represent_message, #to_hash

Instance Method Details

#create(title) ⇒ Object



69
70
71
# File 'lib/cloudflare/kv/namespaces.rb', line 69

def create(title)
	represent_message(post(title: title))
end

#find_by_title(title) ⇒ Object



73
74
75
# File 'lib/cloudflare/kv/namespaces.rb', line 73

def find_by_title(title)
	each.find {|namespace| namespace.title == title }
end

#representationObject



65
66
67
# File 'lib/cloudflare/kv/namespaces.rb', line 65

def representation
	Namespace
end