Class: RBI::RBSComment

Inherits:
Comment show all
Defined in:
lib/rbi/model.rb

Overview

A comment representing a RBS type prefixed with ‘#:`

Instance Attribute Summary

Attributes inherited from Comment

#text

Attributes inherited from Node

#loc, #parent_tree

Instance Method Summary collapse

Methods inherited from Comment

#initialize

Methods inherited from Node

#compatible_with?, #detach, #initialize, #merge_with, #parent_conflict_tree, #parent_scope, #print, #rbs_print, #rbs_string, #replace, #satisfies_version?, #string

Constructor Details

This class inherits a constructor from RBI::Comment

Instance Method Details

#==(other) ⇒ Object

: (Object other) -> bool



83
84
85
86
87
# File 'lib/rbi/model.rb', line 83

def ==(other)
  return false unless other.is_a?(RBSComment)

  text == other.text
end