Class: RBI::BlockParam

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, #print_comment_leading_space

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



544
545
546
547
# File 'lib/rbi/model.rb', line 544

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

#accept_printer(v) ⇒ Object



465
466
467
# File 'lib/rbi/printer.rb', line 465

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

#to_sObject



539
540
541
# File 'lib/rbi/model.rb', line 539

def to_s
  "&#{name}"
end