Class: RBI::Comment
Direct Known Subclasses
Instance Attribute Summary collapse
-
#text ⇒ Object
: String.
Attributes inherited from Node
Instance Method Summary collapse
-
#==(other) ⇒ Object
: (Object other) -> bool.
-
#initialize(text, loc: nil) ⇒ Comment
constructor
: (String text, ?loc: Loc?) -> void.
Methods inherited from Node
#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #rbs_print, #rbs_string, #replace, #satisfies_version?, #string
Constructor Details
#initialize(text, loc: nil) ⇒ Comment
: (String text, ?loc: Loc?) -> void
59 60 61 62 |
# File 'lib/rbi/model.rb', line 59 def initialize(text, loc: nil) super(loc: loc) @text = text end |
Instance Attribute Details
#text ⇒ Object
: String
56 57 58 |
# File 'lib/rbi/model.rb', line 56 def text @text end |
Instance Method Details
#==(other) ⇒ Object
: (Object other) -> bool
65 66 67 68 69 |
# File 'lib/rbi/model.rb', line 65 def ==(other) return false unless other.is_a?(Comment) text == other.text end |