Extract a method from a class
(&self, node: &Node, source: &str, file_path: &str)
| 799 | |
| 800 | /// Extract a method from a class |
| 801 | fn extract_method(&self, node: &Node, source: &str, file_path: &str) -> Option<Entity> { |
| 802 | let name_node = node.child_by_field_name("name")?; |
| 803 | let name = self.node_text(&name_node, source)?; |
| 804 | |
| 805 | let signature = self.build_method_signature(node, source); |
| 806 | |
| 807 | Some( |
| 808 | Entity::new( |
| 809 | name, |
| 810 | EntityKind::Method, |
| 811 | file_path, |
| 812 | node.start_position().row as u32 + 1, |
| 813 | node.end_position().row as u32 + 1, |
| 814 | ) |
| 815 | .with_column(node.start_position().column as u32) |
| 816 | .with_signature(signature), |
| 817 | ) |
| 818 | } |
| 819 | |
| 820 | /// Extract an interface declaration |
| 821 | fn extract_interface( |
no test coverage detected