method
to_symbol
v7.1.3.4 -
Show latest stable
- Class:
ActionView::RenderParser::RipperASTParser::Node
to_symbol()public
No documentation available.
# File actionview/lib/action_view/ripper_ast_parser.rb, line 100
def to_symbol
if type == :@label && self[0] =~ /\A(.+):\z/
$1.to_sym
elsif type == :symbol_literal && self[0].type == :symbol && self[0][0].type == :@ident
self[0][0][0].to_sym
else
raise "not a symbol?: #{self.inspect}"
end
end