Class: RBI::KwParam
- 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
#comments
Attributes inherited from Node
#loc, #parent_tree
Instance Method Summary
collapse
Methods inherited from Param
#initialize
#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
497
498
499
500
|
# File 'lib/rbi/model.rb', line 497
def ==(other)
return false unless other.instance_of?(KwParam)
name == T.cast(other, KwParam).name
end
|
#accept_printer(v) ⇒ Object
418
419
420
|
# File 'lib/rbi/printer.rb', line 418
def accept_printer(v)
v.print("#{name}:")
end
|
423
424
425
426
|
# File 'lib/rbi/printer.rb', line 423
def (v)
super
v.print(" ")
end
|
#to_s ⇒ Object
492
493
494
|
# File 'lib/rbi/model.rb', line 492
def to_s
"#{name}:"
end
|