class RBI::Comment

Attributes

text[RW]

Public Class Methods

new(text, loc: nil) click to toggle source
Calls superclass method RBI::Node::new
# File lib/rbi/model.rb, line 57
def initialize(text, loc: nil)
  super(loc: loc)
  @text = text
end

Public Instance Methods

==(other) click to toggle source
# File lib/rbi/model.rb, line 63
def ==(other)
  return false unless other.is_a?(Comment)
  text == other.text
end
accept_printer(v) click to toggle source
# File lib/rbi/printer.rb, line 158
def accept_printer(v)
  text = self.text.strip
  v.printt("#")
  v.print(" #{text}") unless text.empty?
  v.printn
end