Class: SyntaxTree::LanguageServer::Request::Tuple
- Inherits:
-
Object
- Object
- SyntaxTree::LanguageServer::Request::Tuple
- Defined in:
- lib/syntax_tree/language_server.rb
Overview
Represents an array pattern.
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize(values) ⇒ Tuple
constructor
A new instance of Tuple.
Constructor Details
#initialize(values) ⇒ Tuple
Returns a new instance of Tuple.
194 195 196 |
# File 'lib/syntax_tree/language_server.rb', line 194 def initialize(values) @values = values end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
192 193 194 |
# File 'lib/syntax_tree/language_server.rb', line 192 def values @values end |
Instance Method Details
#===(other) ⇒ Object
198 199 200 |
# File 'lib/syntax_tree/language_server.rb', line 198 def ===(other) values.each_with_index.all? { |value, index| value === other[index] } end |