MCPcopy Create free account
hub / github.com/nodejs/node / write_podspec_map

Function write_podspec_map

deps/v8/third_party/abseil-cpp/absl/abseil.podspec.gen.py:168–181  ·  view source on GitHub ↗

Writes podspec from rule map recursively.

(f, cur_map, depth)

Source from the content-addressed store, hash-verified

166
167
168def write_podspec_map(f, cur_map, depth):
169 """Writes podspec from rule map recursively."""
170 for key, value in sorted(cur_map.items()):
171 indent = " " * (depth + 1)
172 f.write("{indent}{var0}.subspec '{key}' do |{var1}|\n".format(
173 indent=indent,
174 key=key,
175 var0=get_spec_var(depth),
176 var1=get_spec_var(depth + 1)))
177 if isinstance(value, dict):
178 write_podspec_map(f, value, depth + 1)
179 else:
180 write_podspec_rule(f, value, depth + 1)
181 f.write("{indent}end\n".format(indent=indent))
182
183
184def write_podspec_rule(f, rule, depth):

Callers 1

write_podspecFunction · 0.85

Calls 6

sortedFunction · 0.85
get_spec_varFunction · 0.85
write_podspec_ruleFunction · 0.85
formatMethod · 0.65
itemsMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected