OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
manifest list mg
[pettanr/pettanr.git]
/
lib
/
manifest
/
list
/
where
/
auto.rb
1
module Manifest
2
module ListModule
3
module WhereModule
4
class WhereAuto < Base
5
attr :method_name
6
def set_default
7
super
8
@where_manifest['args']['method_name'] ||= self.base_name
9
end
10
11
def init
12
super
13
@method_name = @args['method_name']
14
end
15
16
def base_name
17
if self.model.content?
18
'public_list_where'
19
else
20
'list_where'
21
end
22
end
23
24
def conditions
25
yield @method_name
26
end
27
28
end
29
30
end
31
end
32
end