class RBS::AST::Comment
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/comment.rb, line 9 def initialize(string:, location:) @string = string @location = location end
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/comment.rb, line 14 def ==(other) other.is_a?(Comment) && other.string == string end
Also aliased as: eql?
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/comment.rb, line 20 def hash self.class.hash ^ string.hash end
Source
# File bundled-src/rbs-3.10.0/lib/rbs/ast/comment.rb, line 24 def to_json(state = _ = nil) { string: string, location: location }.to_json(state) end