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 5
attr_reader :location
#string (readonly)
[ GitHub ]# File 'lib/rbs/ast/annotation.rb', line 4
attr_reader :string
Instance Method Details
#==(other) Also known as: #eql?
[ GitHub ]#eql?(other)
Alias for #==.
# File 'lib/rbs/ast/annotation.rb', line 16
alias eql? ==
#hash
[ GitHub ]# File 'lib/rbs/ast/annotation.rb', line 18
def hash self.class.hash ^ string.hash end