Class: Steep::AST::MethodType::Params::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/ast/method_type.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(location:) ⇒ Base

Returns a new instance of Base.



8
9
10
# File 'lib/steep/ast/method_type.rb', line 8

def initialize(location:)
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



6
7
8
# File 'lib/steep/ast/method_type.rb', line 6

def location
  @location
end

Instance Method Details

#update_location(location) ⇒ Object



12
13
14
15
16
17
# File 'lib/steep/ast/method_type.rb', line 12

def update_location(location)
  dup.instance_eval do
    @location = location
    self
  end
end