class SyntaxTree::LanguageServer::Request::Shape
Represents a hash pattern.
Attributes
values[R]
Public Class Methods
new(values)
click to toggle source
# File lib/syntax_tree/language_server.rb, line 179 def initialize(values) @values = values end
Public Instance Methods
===(other)
click to toggle source
# File lib/syntax_tree/language_server.rb, line 183 def ===(other) values.all? do |key, value| value == :any ? other.key?(key) : value === other[key] end end