Class: RBI::RestParam

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



477
478
479
480
# File 'lib/rbi/model.rb', line 477

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

#accept_printer(v) ⇒ Object



403
404
405
# File 'lib/rbi/printer.rb', line 403

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


408
409
410
411
# File 'lib/rbi/printer.rb', line 408

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

#to_sObject



483
484
485
# File 'lib/rbi/model.rb', line 483

def to_s
  "*#{name}"
end