method

to_symbol

Importance_0
v7.0.0 - Show latest stable - 0 notes - Class: Node
to_symbol() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.