class Solargraph::Source::Chain::Array
def initialize children
-
children
(::Array
) --
def initialize children super('::Array') @children = children end
def resolve api_map, name_pin, locals
-
locals
(Enumerable
) -- -
name_pin
(Pin::Base
) -- -
api_map
(ApiMap
) --
def resolve api_map, name_pin, locals child_types = @children.map do |child| child.infer(api_map, name_pin, locals) end type = if child_types.uniq.length == 1 && child_types.first.defined? ComplexType::UniqueType.new('Array', [], child_types.uniq, rooted: true, parameters_type: :list) else ComplexType::UniqueType.new('Array', rooted: true) end [Pin::ProxyType.anonymous(type)] end
def word
def word @word ||= "<#{@type}>" end