Class: RBI::Param

Inherits:
NodeWithComments show all
Extended by:
T::Helpers, T::Sig
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

Returns a new instance of Param.



643
644
645
646
# File 'lib/rbi/model.rb', line 643

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



634
635
636
# File 'lib/rbi/model.rb', line 634

def name
  @name
end

Instance Method Details

#to_sObject



649
650
651
# File 'lib/rbi/model.rb', line 649

def to_s
  name
end