Class: Steep::AST::MethodType::Params::Optional

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

Instance Attribute Summary collapse

Attributes inherited from Base

#location

Instance Method Summary collapse

Methods inherited from Base

#update_location

Constructor Details

#initialize(location:, type:, next_params: nil) ⇒ Optional

Returns a new instance of Optional.



35
36
37
38
39
# File 'lib/steep/ast/method_type.rb', line 35

def initialize(location:, type:, next_params: nil)
  super(location: location)
  @type = type
  @next_params = next_params
end

Instance Attribute Details

#next_paramsObject (readonly)

Returns the value of attribute next_params.



33
34
35
# File 'lib/steep/ast/method_type.rb', line 33

def next_params
  @next_params
end

#typeObject (readonly)

Returns the value of attribute type.



32
33
34
# File 'lib/steep/ast/method_type.rb', line 32

def type
  @type
end