class RBI::OptParam

Attributes

value[R]

Public Class Methods

new(name, value, loc: nil, comments: [], &block) click to toggle source
Calls superclass method RBI::Param::new
# File lib/rbi/model.rb, line 595
def initialize(name, value, loc: nil, comments: [], &block)
  super(name, loc: loc, comments: comments)
  @value = value
  block&.call(self)
end

Public Instance Methods

==(other) click to toggle source
# File lib/rbi/model.rb, line 602
def ==(other)
  OptParam === other && name == other.name && value == other.value
end
accept_printer(v) click to toggle source
# File lib/rbi/printer.rb, line 419
def accept_printer(v)
  v.print("#{name} = #{value}")
end
print_comment_leading_space(v, last:) click to toggle source
Calls superclass method RBI::Param#print_comment_leading_space