##// END OF EJS Templates
templater: rewrite doc of _hybrid class as docstring
Yuya Nishihara -
r31879:868ec199 default
parent child Browse files
Show More
@@ -19,14 +19,17 b' from . import ('
19 util,
19 util,
20 )
20 )
21
21
22 # This helper class allows us to handle both:
22 class _hybrid(object):
23 # "{files}" (legacy command-line-specific list hack) and
23 """Wrapper for list or dict to support legacy template
24 # "{files % '{file}\n'}" (hgweb-style with inlining and function support)
25 # and to access raw values:
26 # "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}"
27 # "{get(extras, key)}"
28
24
29 class _hybrid(object):
25 This class allows us to handle both:
26 - "{files}" (legacy command-line-specific list hack) and
27 - "{files % '{file}\n'}" (hgweb-style with inlining and function support)
28 and to access raw values:
29 - "{ifcontains(file, files, ...)}", "{ifcontains(key, extras, ...)}"
30 - "{get(extras, key)}"
31 """
32
30 def __init__(self, gen, values, makemap, joinfmt):
33 def __init__(self, gen, values, makemap, joinfmt):
31 self.gen = gen
34 self.gen = gen
32 self.values = values
35 self.values = values
General Comments 0
You need to be logged in to leave comments. Login now