Method: SyntaxTree::Else#copy
- Defined in:
- lib/syntax_tree/node.rb
#copy(keyword: nil, statements: nil, location: nil) ⇒ Object
4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 |
# File 'lib/syntax_tree/node.rb', line 4817 def copy(keyword: nil, statements: nil, location: nil) node = Else.new( keyword: keyword || self.keyword, statements: statements || self.statements, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end |