| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| 1 | """ |
||
| 13 | class ReferenceNode(Node): |
||
| 14 | """ |
||
| 15 | SDoc2 node for references. |
||
| 16 | """ |
||
| 17 | |||
| 18 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 19 | def __init__(self, options, argument): |
||
| 20 | """ |
||
| 21 | Object constructor. |
||
| 22 | |||
| 23 | :param dict[str,str] options: The options of this reference. |
||
| 24 | :param str argument: The title of this reference. |
||
| 25 | """ |
||
| 26 | super().__init__('ref', options, argument) |
||
| 27 | |||
| 28 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 29 | def get_command(self): |
||
| 30 | """ |
||
| 31 | Returns the command of this node, i.e. reference. |
||
| 32 | |||
| 33 | :rtype: str |
||
| 34 | """ |
||
| 35 | return 'ref' |
||
| 36 | |||
| 37 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 38 | def is_block_command(self): |
||
| 39 | """ |
||
| 40 | Returns False. |
||
| 41 | |||
| 42 | :rtype: bool |
||
| 43 | """ |
||
| 44 | return False |
||
| 45 | |||
| 46 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 47 | def is_inline_command(self): |
||
| 48 | """ |
||
| 49 | Returns True. |
||
| 50 | |||
| 51 | :rtype: bool |
||
| 52 | """ |
||
| 53 | return True |
||
| 54 | |||
| 55 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 56 | def is_phrasing(self): |
||
| 57 | """ |
||
| 58 | Returns True. |
||
| 59 | |||
| 60 | :rtype: bool |
||
| 61 | """ |
||
| 62 | return True |
||
| 63 | |||
| 65 | node_store.register_inline_command('ref', ReferenceNode) |
||
|
|