Class: RBS::AST::Comment
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/ast/comment.rb |
Class Method Summary
- .new(string:, location:) ⇒ Comment constructor
Instance Attribute Summary
Instance Method Summary
- #==(other) (also: #eql?)
-
#eql?(other)
Alias for #==.
- #hash
- #to_json(state = _ = nil)
Constructor Details
.new(string:, location:) ⇒ Comment
Instance Attribute Details
#location (readonly)
[ GitHub ]# File 'lib/rbs/ast/comment.rb', line 7
attr_reader :location
#string (readonly)
[ GitHub ]# File 'lib/rbs/ast/comment.rb', line 6
attr_reader :string
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#eql?(other)
Alias for #==.
# File 'lib/rbs/ast/comment.rb', line 18
alias eql? ==
#hash
[ GitHub ]# File 'lib/rbs/ast/comment.rb', line 20
def hash self.class.hash ^ string.hash end