Module: SyntaxTree::LanguageServer::Request
- Defined in:
- lib/syntax_tree/language_server.rb
Overview
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.
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.[](value) ⇒ Object
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/syntax_tree/language_server.rb', line 48 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 |