class Solargraph::TypeChecker::ParamDef

Data about a method parameter definition. This is the information from the args list in the def call, not the `@param` tags.

Attributes

name[R]

@return [String]

type[R]

@return [Symbol]

Public Class Methods

from(pin) click to toggle source

Get an array of ParamDefs from a method pin.

@param pin [Solargraph::Pin::Method] @return [Array<ParamDef>]

# File lib/solargraph/type_checker/param_def.rb, line 25
def from pin
  result = []
  pin.parameters.each do |par|
    result.push ParamDef.new(par.name, par.decl)
  end
  result
end
new(name, type) click to toggle source
# File lib/solargraph/type_checker/param_def.rb, line 15
def initialize name, type
  @name = name
  @type = type
end