Writes podspec from rule map recursively.
(f, cur_map, depth)
| 166 | |
| 167 | |
| 168 | def 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 | |
| 184 | def write_podspec_rule(f, rule, depth): |
no test coverage detected