Extract a method from a class
(&self, node: &Node, source: &str, file_path: &str)
| 816 | |
| 817 | /// Extract a method from a class |
| 818 | fn extract_method(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> { |
| 819 | let name_node = node.child_by_field_name("name")?; |
| 820 | let name = self.node_text(&name_node, source)?; |
| 821 | |
| 822 | let signature = self.build_method_signature(node, source); |
| 823 | |
| 824 | Some( |
| 825 | Entity::new( |
| 826 | name, |
| 827 | EntityKind::Method, |
| 828 | file_path, |
| 829 | node.start_position().row as u32 + 1, |
| 830 | node.end_position().row as u32 + 1, |
| 831 | ) |
| 832 | .with_column(node.start_position().column as u32) |
| 833 | .with_signature(signature), |
| 834 | ) |
| 835 | } |
| 836 | |
| 837 | /// Extract an interface declaration |
| 838 | fn extract_interface( |
no test coverage detected