Extract a method from a class
(&self, node: &Node, source: &str, file_path: &str)
| 844 | |
| 845 | /// Extract a method from a class |
| 846 | fn extract_method(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> { |
| 847 | let name_node = node.child_by_field_name("name")?; |
| 848 | let name = self.node_text(&name_node, source)?; |
| 849 | |
| 850 | let signature = self.build_method_signature(node, source); |
| 851 | |
| 852 | Some( |
| 853 | Entity::new( |
| 854 | name, |
| 855 | EntityKind::Method, |
| 856 | file_path, |
| 857 | node.start_position().row as u32 + 1, |
| 858 | node.end_position().row as u32 + 1, |
| 859 | ) |
| 860 | .with_column(node.start_position().column as u32) |
| 861 | .with_signature(signature), |
| 862 | ) |
| 863 | } |
| 864 | |
| 865 | /// Extract an interface declaration |
| 866 | fn extract_interface( |
no test coverage detected