class Solargraph::Pin::ProxyType

Public Class Methods

anonymous(return_type) click to toggle source

@param return_type [ComplexType] @return [ProxyType]

# File lib/solargraph/pin/proxy_type.rb, line 17
def self.anonymous return_type
  parts = return_type.namespace.split('::')
  namespace = parts[0..-2].join('::').to_s
  name = parts.last.to_s
  # ProxyType.new(nil, namespace, name, return_type)
  ProxyType.new(
    closure: Solargraph::Pin::Namespace.new(name: namespace), return_type: return_type
  )
end
new(return_type: ComplexType::UNDEFINED, **splat) click to toggle source

@param return_type [ComplexType]

Calls superclass method Solargraph::Pin::Base.new
# File lib/solargraph/pin/proxy_type.rb, line 6
def initialize return_type: ComplexType::UNDEFINED, **splat
  super(**splat)
  @return_type = return_type
end

Public Instance Methods

context() click to toggle source
# File lib/solargraph/pin/proxy_type.rb, line 11
def context
  @return_type
end