Class: RBI::NoKwParam

Inherits:
Param show all
Defined in:
lib/rbi/model.rb

Instance Attribute Summary

Attributes inherited from NodeWithComments

#comments

Attributes inherited from Node

#loc, #parent_tree

Instance Method Summary collapse

Methods inherited from Param

#compatible_with?, #name

Methods inherited from NodeWithComments

#annotations, #comments?, #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(loc: nil, comments: nil, &block) ⇒ NoKwParam

Returns a new instance of NoKwParam.

Signature:

  • (?loc: Loc?, ?comments: Array[Comment]?) ?{ (NoKwParam node) -> void } -> void



820
821
822
823
# File 'lib/rbi/model.rb', line 820

def initialize(loc: nil, comments: nil, &block)
  super(loc: loc, comments: comments)
  block&.call(self)
end

Instance Method Details

#==(other) ⇒ Object

Signature:

  • (Object? other) -> bool



838
839
840
# File 'lib/rbi/model.rb', line 838

def ==(other)
  NoKwParam === other
end

#anonymous?Boolean

Signature:

  • -> bool

Returns:

  • (Boolean)


833
834
835
# File 'lib/rbi/model.rb', line 833

def anonymous?
  false
end

#to_sObject

Signature:

  • -> String



827
828
829
# File 'lib/rbi/model.rb', line 827

def to_s
  "**nil"
end