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