repo.or.cz
/
couchobject.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Updated website to reflect proper git repo path
[couchobject.git]
/
lib
/
couch_object
/
view.rb
blob
2c1d9d926287dc441986966d50d88b2a9a3a6bb3
1
require "enumerator"
2
3
module CouchObject
4
class View
5
def self.create(db, name, query)
6
db.post("/#{db.name}/_view_#{name}", query)
7
end
8
9
def initialize(db, name)
10
@db = db
11
@name = name
12
end
13
attr_accessor :db
14
15
def name
16
"_view_#{@name.dup}"
17
end
18
19
def delete
20
@db.delete("/#{db.name}/#{name}")
21
end
22
end
23
end