class RBI::SigParam
Attributes
name[R]
type[R]
Public Class Methods
new(name, type, loc: nil, comments: [], &block)
click to toggle source
Calls superclass method
RBI::NodeWithComments::new
# File lib/rbi/model.rb, line 988 def initialize(name, type, loc: nil, comments: [], &block) super(loc: loc, comments: comments) @name = name @type = type block&.call(self) end
Public Instance Methods
==(other)
click to toggle source
# File lib/rbi/model.rb, line 996 def ==(other) other.is_a?(SigParam) && name == other.name && type == other.type end
accept_printer(v)
click to toggle source
# File lib/rbi/printer.rb, line 625 def accept_printer(v) v.print("#{name}: #{type}") end
print_comment_leading_space(v, last:)
click to toggle source
# File lib/rbi/printer.rb, line 630 def print_comment_leading_space(v, last:) v.printn v.printt v.print(" " * (name.size + type.size + 3)) v.print(" ") unless last end