class RBS::AST::Annotation
Attributes
location[R]
string[R]
Public Class Methods
new(string:, location:)
click to toggle source
# File rbs-2.7.0/lib/rbs/ast/annotation.rb, line 9 def initialize(string:, location:) @string = string @location = location end
Public Instance Methods
==(other)
click to toggle source
# File rbs-2.7.0/lib/rbs/ast/annotation.rb, line 14 def ==(other) other.is_a?(Annotation) && other.string == string end
Also aliased as: eql?
hash()
click to toggle source
# File rbs-2.7.0/lib/rbs/ast/annotation.rb, line 20 def hash self.class.hash ^ string.hash end
to_json(state = _ = nil)
click to toggle source
# File rbs-2.7.0/lib/rbs/ast/annotation.rb, line 24 def to_json(state = _ = nil) { string: string, location: location }.to_json(state) end