Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Prism::SourceEncodingNode.type
type
lib/prism/node.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/lib/prism/node.rb, line 15493
def self.type
:source_encoding_node
end
Similar to type, this method returns a symbol that you can use for splitting on the type of the node without having to do a long === chain. Note that like type, it will still be slower than using == for a single class, but should be faster in a case statement or an array comparison.
def self.type: () -> Symbol