Class: RBS::AST::Ruby::Annotations::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rbs/ast/ruby/annotations.rb,
sig/ast/ruby/annotations.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location, prefix_location) ⇒ Base

Returns a new instance of Base.

Parameters:



10
11
12
13
# File 'lib/rbs/ast/ruby/annotations.rb', line 10

def initialize(location, prefix_location)
  @location = location
  @prefix_location = prefix_location
end

Instance Attribute Details

#locationLocation (readonly)

Location that covers all of the annotation

Returns:



26
27
28
# File 'sig/ast/ruby/annotations.rbs', line 26

def location
  @location
end

#prefix_locationLocation (readonly)

Location of @rbs, @rbs!, or : prefix

Returns:



30
31
32
# File 'sig/ast/ruby/annotations.rbs', line 30

def prefix_location
  @prefix_location
end

Instance Method Details

#bufferBuffer

Returns:



15
16
17
# File 'lib/rbs/ast/ruby/annotations.rb', line 15

def buffer
  location.buffer
end

#type_fingerprintObject

Returns the type fingerprint for this annotation

Returns:

  • (Object)


37
# File 'sig/ast/ruby/annotations.rbs', line 37

def type_fingerprint: () -> untyped