Class: RBI::Param

Inherits:
NodeWithComments show all
Extended by:
T::Helpers
Defined in:
lib/rbi/model.rb

Instance Attribute Summary collapse

Attributes inherited from NodeWithComments

#comments

Attributes inherited from Node

#loc, #parent_tree

Instance Method Summary collapse

Methods inherited from NodeWithComments

#annotations, #merge_with, #version_requirements

Methods inherited from Node

#compatible_with?, #detach, #merge_with, #parent_conflict_tree, #parent_scope, #print, #rbs_print, #rbs_string, #replace, #satisfies_version?, #string

Constructor Details

#initialize(name, loc: nil, comments: []) ⇒ Param

: (String name, ?loc: Loc?, ?comments: Array) -> void



520
521
522
523
# File 'lib/rbi/model.rb', line 520

def initialize(name, loc: nil, comments: [])
  super(loc: loc, comments: comments)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

: String



517
518
519
# File 'lib/rbi/model.rb', line 517

def name
  @name
end

Instance Method Details

#to_sObject

: -> String



527
528
529
# File 'lib/rbi/model.rb', line 527

def to_s
  name
end