from typing import Any, List, Union
from ..utils import alternating_key_value, asboolean
from .base import SimaProCSVBlock
[docs]
class Method(SimaProCSVBlock):
def __init__(self, block: List[list], header: dict):
"""Parse a `Method` block.
Each block as the form:
key
value
with empty lines in between, e.g.
```
Method
Name
DC Test
Version
1 8
Comment
Damage category import testing
Category
Others\\NORM
Use Damage Assessment
Yes
Use Normalization
No
Use Weighting
No
```
"""
[docs]
self.parsed = {k: reformat(v) for k, v in alternating_key_value(block)}