class Solargraph::Pin::Closure
Attributes
scope[R]
@return [::Symbol] :class or :instance
Public Class Methods
new(scope: :class, **splat)
click to toggle source
Calls superclass method
Solargraph::Pin::Base.new
# File lib/solargraph/pin/closure.rb, line 8 def initialize scope: :class, **splat super(**splat) @scope = scope end
Public Instance Methods
binder()
click to toggle source
# File lib/solargraph/pin/closure.rb, line 24 def binder @binder || context end
context()
click to toggle source
Calls superclass method
Solargraph::Pin::Common#context
# File lib/solargraph/pin/closure.rb, line 13 def context @context ||= begin result = super if scope == :instance Solargraph::ComplexType.parse(result.namespace) else result end end end
gates()
click to toggle source
@return [Array<String>]
# File lib/solargraph/pin/closure.rb, line 29 def gates # @todo This check might not be necessary. There should always be a # root pin closure ? closure.gates : [''] end