Class: RBI::KwRestParam

Inherits:
Param show all
Extended by:
T::Sig
Defined in:
lib/rbi/model.rb,
lib/rbi/printer.rb

Instance Attribute Summary

Attributes inherited from Param

#name

Attributes inherited from NodeWithComments

#comments

Attributes inherited from Node

#loc, #parent_tree

Instance Method Summary collapse

Methods inherited from Param

#initialize

Methods inherited from NodeWithComments

#initialize, #merge_with, #oneline?

Methods inherited from Node

#compatible_with?, #detach, #group_kind, #initialize, #merge_with, #oneline?, #parent_conflict_tree, #parent_scope, #print, #replace, #string

Constructor Details

This class inherits a constructor from RBI::Param

Instance Method Details

#==(other) ⇒ Object



529
530
531
532
# File 'lib/rbi/model.rb', line 529

def ==(other)
  return false unless other.instance_of?(KwRestParam)
  name == T.cast(other, KwRestParam).name
end

#accept_printer(v) ⇒ Object



450
451
452
# File 'lib/rbi/printer.rb', line 450

def accept_printer(v)
  v.print("**#{name}")
end


455
456
457
458
# File 'lib/rbi/printer.rb', line 455

def print_comment_leading_space(v)
  super
  v.print("  ")
end

#to_sObject



524
525
526
# File 'lib/rbi/model.rb', line 524

def to_s
  "**#{name}:"
end