Class: RBI::Comment
Direct Known Subclasses
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from Node
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(text, loc: nil) ⇒ Comment
constructor
A new instance of Comment.
Methods inherited from Node
#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #replace, #satisfies_version?, #string
Constructor Details
#initialize(text, loc: nil) ⇒ Comment
Returns a new instance of Comment.
62 63 64 65 |
# File 'lib/rbi/model.rb', line 62 def initialize(text, loc: nil) super(loc: loc) @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
59 60 61 |
# File 'lib/rbi/model.rb', line 59 def text @text end |
Instance Method Details
#==(other) ⇒ Object
68 69 70 71 72 |
# File 'lib/rbi/model.rb', line 68 def ==(other) return false unless other.is_a?(Comment) text == other.text end |