module SyntaxTree::LanguageServer::Request

This is a small module that effectively mirrors pattern matching. We’re using it so that we can support truffleruby without having to ignore the language server.

Public Class Methods

[](value) click to toggle source
# File lib/syntax_tree/language_server.rb, line 203
def self.[](value)
  case value
  when Array
    Tuple.new(value.map { |child| self[child] })
  when Hash
    Shape.new(value.transform_values { |child| self[child] })
  else
    value
  end
end