Return a new Rule object loaded from a file stored at ``rule_file`` with the text and it's data as with YAML frontmatter.
(cls, rule_file, is_builtin=True)
| 2270 | |
| 2271 | @classmethod |
| 2272 | def from_file(cls, rule_file, is_builtin=True): |
| 2273 | """ |
| 2274 | Return a new Rule object loaded from a file stored at |
| 2275 | ``rule_file`` with the text and it's data as with YAML frontmatter. |
| 2276 | """ |
| 2277 | rule = Rule(is_builtin=is_builtin) |
| 2278 | rule.load_data(rule_file=rule_file) |
| 2279 | return rule |
| 2280 | |
| 2281 | @property |
| 2282 | def pysafe_expression(self): |
no test coverage detected